Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

April 21, 2020

Send email from Microsoft excel with customized sheet data

Hi folks,

Have you ever faced requirement where you have to send email from an excel with excel data. If you are in that situation, this blog makes your life easier.

Pre-requisites
Send customized excel data of each row as an email. You should have data in each row and you should know have recipient e-mail address
You should have configured e-mail client like outlook, mail of desktop

Procedure
  1. Use Hyperlink function of excel
    • Syntax
      • =HYPERLINK("mailto:"&e-mailCellNo&"?subject="&subjectCellNo&"&body="&bodyCellNo&"%0A","Send email")
    • Help
      • Cellno in syntax should point to your data cell number
      • %0A - New line
      • mailto - The recipient mail address
      • subject - the text
      • body - the body text
    • Note
      • If you have any special characters, then use ENCODEURL function
      • Don't put the ENCODEURL function in HYPERLINK function
      • Make sure, ENCODEURL output points to a different cell and use that cell number in HYPERLINK
  2. Use $ to use the same cell data repeatedly
  3. After doing the hyperlink to a cell, you should be able to view "Send email"
  4. Click on the send email
  5. Opens the configured/default e-mail client by filling the recipient, subject and body content from excel sheet
  6. Click on "send" or "Ctrl+Enter" keyboard shortcut to send email
Hope, this helps you to explore excel and send email with excel data to many recipients with single click

Please send your valuable feedback and comments to psrdotcom@gmail.com

August 10, 2018

Microsoft Excel Copy row values to another sheet next available row when the value changes

Hi friends,

My friend had given me a problem in excel of copy row whenever the values changed to another sheet next available row.

I have come-up with this following code

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Application.Intersect(Target, Target.ActiveSheet.Range("A1:D1")) Is Nothing Then
        Application.EnableEvents = False
        Application.ScreenUpdating = False
        MsgBox ("Hi")
        Call ValueChange
        Application.EnableEvents = True
    End If
End Sub
Sub ValueChange()
        Dim lastrow As Long
        
        lastrow = Sheets("Sheet2").Range("A65536").End(xlUp).Row + 1
        Sheets("Sheet2").Range("A" & lastrow & ": D" & lastrow).Value = Sheets("Sheet1").Range("A1:D1").Value

End Sub

Hope it will help you.

Note:
Please share your valuable comments and feedback to psrdotcom@gmail.com

March 31, 2017

Change currency (Rupees and Euros) to English text in Microsoft Excel

Hi Friends,

Today I'll discussing about converting currency (Rupees and Euros) to textual representation which I have found by googling and updated to cover 2 currencies.

Source

The VBA Macro code is available on my public GIST
ConvertCurrencyToEnglish.txt

Usage


  • Add this in your excel module using developer options
  • Two functions
  • ConvertRupeesToEnglish - Which converts numeric data to rupees with pre-pending "Rupees " and appending " Only"
  • ConvertEurosToEnglish - Which converts numeric data to rupees with pre-pending "Euros " and appending " Only"
  • Note: If number has precisioin, it will add "Paise" and "Cent" to respective currency.
Please send your review and feedback to psrdotcom@gmail.com

February 06, 2016

Microsoft Excel Select a value from a predefined list of values with dropdown option to validate the data

Hi friends,

When I was preparing a sheet by referencing some pre-defined names as list to a field/cell. I was thinking the feature of Microsoft Excel dropdown list. After exploring the option and using, I thought of sharing with you all.

Objective: Selecting a cell value from a list of pre-defined values

Procedure:
  1. Open blank excel workbook
  2. Prepare you template with headers
  3. Create a new sheet and rename it. Ex: "Names"
  4. Enter the values from Column A from cell A1 in vertical direction
  5. Don't use any other columns
  6. Don't leave any empty cell in between the values
  7. Leave first cell as empty, if you want to include the empty option in a dropdown
  8. Select the cell which contains the values
  9. Right click and choose the option "Define Name"
  10. Give a name to the list of values. Ex: NamesList
  11. Click on "OK" button
  12. Now, move to the sheet where we want to use the list of names as a dropdown option
  13. Select the cell(s), where we want to have the dropdown list
  14. Click on "Data" Menu
  15. From "Data Tools" ribbon, click "Data Validation" from "Data Validation" submenu
  16. In Settings tab, Validation Criteria section, for the option Allow, select "List"
  17. Choose the options
    • Ignore blank: Ignore when user no selected any option
    • In-cell Dropdown: Show the dropdown list in cell
  18. In "Source" field, type the defined name for the list preceded with = (Equal to) symbol. Ex: =NamesList
  19. Now, you should be able to see the dropdown with empty values
  20. Select the predefined values from the dropdown list of names.
Please send your comments and feedback to psrdotcom@gmail.com

    November 26, 2015

    Add (append or prepend) text along with excel functions/formula in a single cell

    Hi friends,

    Today I have come across a situation where i want to have the cell to descriptive and to have summation of some cells. I have got information on how to do it. Please find below

    Input Data:

    3
    4
    2

    I want a cell to be on top those with description and summation value

    Expected output data:

    Sum = 9
    3
    4
    2

    To get the output, I have written the following function

    Syntax:
    ="Text"& function

    Example:
    ="Sum = "& SUM(A2:A4)

    We can append and prepend the text to excel function to combine text and numbers as well.

    Please send your comments and feedback to psrdotcom@gmail.com

    March 21, 2012

    Excel Macro to Split Cell Data with Delimiter and Copy in other Columns

    Hi all,
    Today I have written one more small macro in Excel to split the data with the delimiter and copy to the columns which are beside to the data.


    Sub splitdata()

    Dim data As String
    Dim values As Variant
    Dim i As Long

        Set DataRange = Range("A1").CurrentRegion
        Range("A1").Select
        For Each cell In Range("A1").CurrentRegion
           
            'Getting text from the cell
            data = cell.Text
           
            'MsgBox ("Data :" & data)
           
            'Gettings Values
            values = split(data, ",")
           
            For i = 0 To UBound(values)
                'MsgBox ("Value is: " & values(i))
                'Splitting to other columns
                cell.Offset(0, i + 1).Value = values(i)

            Next i

        Next cell  
     

    'Autofit the content to the column
        Cells.EntireColumn.AutoFit
       
    End Sub


    Please send your feedback and comments to psrdotcom@gmail.com

    January 30, 2012

    Hide/Unhide Microsoft Excel 2007 Rows/Columns to Protect your data

    Hi Friends,
    Do you want to hide[protect] the data then please follow the steps

    Step 1: User left click in "Microsoft Excel - Book1"
    Step 2: User mouse drag start in "Microsoft Excel - Book1" to select the rows
    Step 3: User mouse drag end in "Microsoft Excel - Book1" to finish the row selection

    Step 4: User right click on any of the selected row number in "Microsoft Excel - Book1" to get the row selection menu

    Step 5: User left click on "Hide (menu item)" to hide the rows along with data

    Step 6: User right click in "Microsoft Excel - Book1" to unhide the hidden rows

    Step 7: User left click on "Unhide (menu item)" to get the data back

    Step 8: Now User can see the rows along with the data

    Step 9: User right click in "Microsoft Excel - Book1" to see the column selection pop-up menu

    Step 10: User left click on "Hide (menu item)" to hide the columns along with the data

    Step 11: User right click in "Microsoft Excel - Book1" to get the pop-up

    Step 12: User left click on "Unhide (menu item)" to get the data back

    Step 13: See the unhidden columns along with data now













































































    Featured Post

    Java Introdcution

    Please send your review and feedback to psrdotcom@gmail.com