+ Reply to Thread
Results 1 to 9 of 9

Read/Retrieve/locate data between different excel sheet using macro/vba

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    16

    Read/Retrieve/locate data between different excel sheet using macro/vba

    I am using excel to send mail.
    The example workbook below shows that whenever "day left" is less than 10, cell will turn orange.
    By keying "x" it send mail with the email subject and msg already keyed in.
    However i need to relocate the email address column to another sheet.
    Is there anyway for the "Names" to locate/retrieve the correct email addresss from the other sheet?
    Example2.xlsm is what i may want it to look like.
    Pls look at the two example to get a better idea on what i am asking for.
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    Hello EugeneE,

    Maybe the attached WorkBook is what you want.

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    Another method.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    AlphaFrog,

    Really thanks for your help.

    But, I have an error on this code:

    Set FoundEmail = Sheets("Email").Range("A:A").Find(What:=Cells(Target.Row, 3), _
    LookAt:=xlWhole, _
    MatchCase:=False)


    The Email list on sheet 2 is somehow act as a database. this is to prevent the user to manually change the email all the time. Jus enter the name, it locate the email and send out automatically.
    Last edited by EugeneE; 04-25-2013 at 04:31 AM.

  5. #5
    Registered User
    Join Date
    04-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    Quote Originally Posted by Winon View Post
    Hello EugeneE,

    Maybe the attached WorkBook is what you want.

    Also see the "Please consider" note at the bottom of this post.
    Alright no problem.

  6. #6
    Registered User
    Join Date
    04-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    AlphaFrog,

    Sorry, my mistake.
    Your code worked.
    Thanks for your help.
    Pardon me for asking you one more question,
    is there a way to combine two different email body for the same name, into one email?

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    Hello EugeneE,

    I have revised the WorkBook, and maybe you would like it more as it is now?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    Hi Winon,

    That was great. Thanks for your help.
    However, if "David" has two task that is about to due, if there a way to merge two msg into an email?

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Read/Retrieve/locate data between different excel sheet using macro/vba

    Hello EugeneE,

    However, if "David" has two task that is about to due, if there a way to merge two msg into an email?
    I see that you have marked this Thread as Solved. So no need for me to reply.

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1