Results 1 to 5 of 5

Cell reference in VBA code with Excel Functions

Threaded View

  1. #1
    Insomniac53
    Guest

    Cell reference in VBA code with Excel Functions

    I don't use Excel that often, and VBA even less often, so I suspect I'm missing some simple concept. I have this line of code in a macro:
    ActiveCell.Offset(0, 7).Formula = "=VLOOKUP($C21,Lists!$C$1:$E$99,3,FALSE)"

    It works, except that it doesn't update the $C21 to $C22, $C23 etc. when called to create new rows. I can see that this is probably because the VLOOKUP arguments are quotes rather than dynamic cell references, but I'm not sure how to get around it. Any ideas?

    Thanks.
    Last edited by Insomniac53; 07-21-2011 at 02:59 AM.

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