+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP to reference cell, not column number

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    Dike, IOWA
    MS-Off Ver
    Excel 2010
    Posts
    19

    VLOOKUP to reference cell, not column number

    Trying to write a vlookup formula to look-up the date of the column instead of the row number, so when I copy the formula, I don't have to continue to change the ROW number inside my formula for my 52 week spreadsheet.

    =IF(ISERROR(VLOOKUP($A2,'CURRENT SALES'!$A$1:$BJ$190,4,FALSE)*$D2),0,VLOOKUP($A2,'CURRENT SALES'!$A$1:$BJ$190,4,FALSE)*$D2)

    Tried all kinds of MATCH, INDEX, LOOKUP combinations, just can't seem to find the right combination.

    Thanks for any help you can provide.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: VLOOKUP to reference cell, not column number

    Hello Prodschdler there is #Value Errors on the second sheet
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: VLOOKUP to reference cell, not column number

    Try this in G2 =INDEX('CURRENT SALES'!$C$2:$BJ$23,MATCH($A2,'CURRENT SALES'!$A$2:$A$23,0),MATCH(G$1,'CURRENT SALES'!$D$1:$BJ$1,0))*$D$2
    Drag across and Down in sheet 1

    Or =iferror(INDEX('CURRENT SALES'!$C$2:$BJ$23,MATCH($A2,'CURRENT SALES'!$A$2:$A$23,0),MATCH(G$1,'CURRENT SALES'!$D$1:$BJ$1,0)),0)*$D$2
    Last edited by hemesh; 10-18-2013 at 11:13 AM. Reason: multiplication

  4. #4
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: VLOOKUP to reference cell, not column number

    change the red one
    Please Login or Register  to view this content.
    with this
    Please Login or Register  to view this content.
    so it will be like this:
    Please Login or Register  to view this content.
    Click (*) if you received helpful response.

    Regards,
    David

  5. #5
    Registered User
    Join Date
    10-09-2013
    Location
    Dike, IOWA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: VLOOKUP to reference cell, not column number

    hemesh, SDCh,
    Thanks for the solutions. Both work fine. What does $1:$1 represent in the MATCH statement, is that just excel shorthand for top ROW?

    Thank again!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: VLOOKUP to reference cell, not column number

    That is "locking" row 1 in place in that formula so that when you copy down, the reference wont change - called absoluting...

    $ is used to absolute a cell reference, locking it so that when copied, it doesnt change.. it comes in 3 different "flavors...

    $A$1 absolutes the entire cell reference, it will not chance when copied down or across
    $A1 absolutes only the column, "A" will not change when copied across, but "1" WILL change when copied down
    A$1 absolutes only the row, "1" will not change when copied down, but "A" will change when copied across

    A slight veriation is when you use just a row (or column) as the range, then you just absolute as $1:$1
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    10-09-2013
    Location
    Dike, IOWA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: VLOOKUP to reference cell, not column number

    FDinnins,
    Your last statement was what I was wondering. I've never seen it written like that before, thought you always had to have the COLUMN letter as well.

    Good info, thanks!

+ 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. Can I use Vlookup to sum same reference number
    By lostinexcel1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-01-2012, 10:12 AM
  2. Remove absolute reference in vlookup column number?
    By Gazpaxo in forum Excel General
    Replies: 4
    Last Post: 09-17-2011, 04:17 PM
  3. Go to a cell in column, based on a reference number
    By Joshua@work in forum Excel General
    Replies: 5
    Last Post: 06-30-2010, 07:28 PM
  4. Can I use Vlookup to sum same reference number
    By lekku in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2010, 08:10 PM
  5. Insert a formula with relative cell reference based on a number in a column
    By Dcritelli in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2007, 05:54 PM

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