Consulting

Results 1 to 8 of 8

Thread: VLookup and column indicator

  1. #1

    VLookup and column indicator

    Good morning. I am using the VLoookup command to look to another sheet
    for data. I need to bring over all the data that is is row one. This might be
    50 cells. I can get the Vlookup command to work just fine what I need to know is how do I get the column indecator to change for each cell when
    entering the vlookupcommand?
    Example =Vlookup(A2,Sheet2!A1:Z1,2,0) How do I get the 2 to change to
    3 and then 4,5,6. I can set up the Vlookup command and manual change
    the column indecator but that is a job. Thanks for your help
    Max

  2. #2

    vlookup and column indicator

    Check out the file attached and the formula in it...

  3. #3

    Reply to post on post

    I guess I need to reply to read the attachment

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =Vlookup($A$2,Sheet2!A1:Z1,COLUMN(B1),0)
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    Quote Originally Posted by Tenspeed39355
    I guess I need to reply to read the attachment
    Why???

    Simply click on the attached file and it will open for you. Replying is a matter of courtesy to the other person trying to assist you.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  6. #6

    Changing the column indicator

    I still have not been able to get the right formula for moving JUST the
    column indicator. This is what I need to do. Example:
    =VLookup($A$1,Sheet2!$A$1:$Z$1,2,0). I need the formula to stay the same with the exception of the column indecator. When I move across from A to Z I need the comumn indecator to change from 2 to 3 and from 3 to 4 until I get to Z. Can this be done?? Thanks for your time with this.
    Max

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I showed you how.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8

    reply to comumn indicator

    Ok thanks for your help
    Max

Posting Permissions

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