+ Reply to Thread
Results 1 to 2 of 2

Creating a Macro with a lookup command

  1. #1
    Registered User
    Join Date
    07-20-2009
    Location
    cupertino,ca
    MS-Off Ver
    Excel 2003
    Posts
    1

    Creating a Macro with a lookup command

    Hi all! Im new to the world of creating macros in excel and definitely am in need of some helpful information.

    What I need to do is create a macro that will populate certain cells with cost information that is located on a main spreadsheet. I know I need to use a lookup command, but I'm not sure if i have to select the cells individually or the entire column since only some of the cells need to be filled out- possible if command? (and this number changes each time). I have many templates that all have the similar formats but different products. There is already on macro that is being ran but it generates data for only the products that are made by our company. I would like to create a macro that will populate the cells related to our 3rd party products without interfering with the results of the previous macro.

    Any help would be much appreciated!

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Creating a Macro with a lookup command

    you can use conditional vlookup
    example
    you can have this formula in C1
    =if(B1<>"".vlookup(...........),"')

    that is if b1 is not blank the vlookup is done on C1 . if B1 blank c1 is blank.

+ 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