+ Reply to Thread
Results 1 to 3 of 3

String from a Range

  1. #1
    Forum Contributor
    Join Date
    06-18-2015
    Location
    Milton Keynes
    MS-Off Ver
    2016
    Posts
    101

    String from a Range

    Hi Guys,

    I have a VBA macro that sends an e-mail.

    I'm now trying to get it to lookup the e-mail address.

    For testing I was using

    Please Login or Register  to view this content.
    I'm happy with this, and this works, But now I want to look up the e-mail address, using a second excel document as my contacts list, based on the account number.

    I've tried playing around with

    Please Login or Register  to view this content.

    and a couple of others. I'll be honest, I was fishing hoping it would work.

    Cell H25 has a Vlookup and so contains the contact I want it to use in the string.

    Can anyone help??

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: String from a Range

    You don't need that to be a constant. H25 should be "H25". You don't need ActiveSheet unless you are going to prefix the workbook object to it. Range() defaults prefix to activeworkbook.activesheet.

    You seldom need Call. e.g.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-18-2015
    Location
    Milton Keynes
    MS-Off Ver
    2016
    Posts
    101

    Re: String from a Range

    Thanks Kenneth.

    I've got it working now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Summing a range if cell in another range contains string
    By Caugello in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-18-2014, 12:27 PM
  2. [SOLVED] IF range of cells contains string of text, return contents of cell where string is found
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2013, 09:56 AM
  3. [SOLVED] VBA to concatenate a string, to a cell value in a range, to another string.
    By Sacharny in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2013, 03:42 PM
  4. Replies: 2
    Last Post: 12-12-2012, 04:19 AM
  5. Replies: 1
    Last Post: 07-27-2012, 05:37 PM
  6. Replies: 6
    Last Post: 05-04-2011, 12:09 PM
  7. [SOLVED] Find the POSITION IN A RANGE of text in a string that matches value(s) in a range
    By Cornell1992 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2006, 03:25 PM
  8. [SOLVED] Retrieving range string from named range
    By clapper in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-13-2005, 11:05 AM

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