+ Reply to Thread
Results 1 to 5 of 5

copy formula across and increase VLOOKUP Column reference by 1 using "COLUMNS" formula

  1. #1
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    copy formula across and increase VLOOKUP Column reference by 1 using "COLUMNS" formula

    I am trying to incorporate COLUMNS to automatically increase the lookup column reference by one when I copy the formula across (in this example, I want the "7s" to increase to 8, 9, 10, etc when I copy across). Can you please show me how this should look in the formula below, or if there is a better way to do this?? thank you!
    =IF(VLOOKUP(C63,'results'!$B$6:$AE$5000,7,0)=0,"",VLOOKUP(C63,'results'!$B$6:$AE$5000,7,0))

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: copy formula across and increase VLOOKUP Column reference by 1 using "COLUMNS" formula

    Perhaps

    Please Login or Register  to view this content.
    You may need to add a number to the Column() to get it lined up correctly (like: Column() +7 )
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Re: copy formula across and increase VLOOKUP Column reference by 1 using "COLUMNS" formula

    thanks for the quick reply - I am able to get it to line up properly by putting in -4 where you suggested the +7, however when I copy the formula across, it just keeps the -4, instead of changing to -3, -2, etc. Is there a way to make this change automatic?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: copy formula across and increase VLOOKUP Column reference by 1 using "COLUMNS" formula

    Column() returns the column the formula is in. So if you pull a formula of = Column() - 4 across it should do what I think you want.

  5. #5
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Re: copy formula across and increase VLOOKUP Column reference by 1 using "COLUMNS" formula

    Yay! It works. I needed to change C63 to $C63 so the VLOOKUP column source stayed the same when I copied across. Thank you!

+ 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