+ Reply to Thread
Results 1 to 3 of 3

Thread: Formula with static and dynamic cell references

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    St. John's, Newfoundland
    MS-Off Ver
    Excel 2007
    Posts
    1

    Formula with static and dynamic cell references

    I'm using the VLOOKUP function to find a specific value in a table and enter its corresponding value into a cell. The formula is below:

    =VLOOKUP(Q2,HBF!A1:B72,2,FALSE)

    This formula works fine for the first cell, but when I copy it into cells below it in my table, the cell references change. What I want the function to do is change the lookup_value (Q2) but leave the table array (HBF!A1:B72) the same. So I want the formula to look something like this:

    =VLOOKUP(Q3,HBF!A1:B72,2,FALSE)
    =VLOOKUP(Q4,HBF!A1:B72,2,FALSE)
    =VLOOKUP(Q5,HBF!A1:B72,2,FALSE)
    =VLOOKUP(Q6,HBF!A1:B72,2,FALSE)

    Instead, I'm getting something like this:

    =VLOOKUP(Q3,HBF!A2:B73,2,FALSE)
    =VLOOKUP(Q4,HBF!A3:B74,2,FALSE)
    =VLOOKUP(Q5,HBF!A4:B75,2,FALSE)
    =VLOOKUP(Q6,HBF!A5:B76,2,FALSE)

    Can anyone suggest how I might change the "lookup_value" depending on the cell, but keep the "table_array" field the same?

    Thanks

    -zack

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Formula with static and dynamic cell references

    see: http://office.microsoft.com/en-us/ex...005198323.aspx specifically re: absolute & relative referencing.

  3. #3
    Forum Guru 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Vienna, VA, USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    2,257

    Re: Formula with static and dynamic cell references

    =VLOOKUP(Q3,HBF!$A$1:$B$72,2,FALSE)

    Look up Excel help on absolute and relative references....
    Making the world a better place one fret at a time
    ||||||

    If someone helped you, please click on the star icon at the bottom of their post

    If your problem is solved, please update the first post:
    EDIT, Go Advanced button, set Prefix to SOLVED

    [code]
    ' Enclose code in tags like this
    [/code]

    Don't attach a screenshot
    --just attach your Excel file! It's easier and will let us experiment with your data, formulas, and code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0