+ Reply to Thread
Results 1 to 27 of 27

Search and Get Function Help

  1. #1
    Registered User
    Join Date
    06-01-2005
    Posts
    4

    Search and Get Function Help

    Hi. I'm trying to compare columns from one sheet to another, and if there is a match, pull data in a column next to it. I tried to use the DGET, but I couldn't get it to work properly. See example below:

    Worksheet 1
    2
    4
    1
    2
    5
    4
    3

    Worksheet 2
    1 Test 1
    2 Test 2
    3 Test 3
    4 Test 4
    5 Test 5

    What I'm looking to do is have Worksheet 1 show the description next to the number, see below:
    2 Test 2
    4 Test 4
    1 Test 1
    2 Test 2
    5 Test 5
    4 Test 4
    3 Test 3


    I know that this can easily be done with sql, but I wasn't sure if I could do it that easily in excel. Thanks in advance for your help.

    Angel

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    On Worksheet 1...

    B1, copied down:

    =VLOOKUP(A1,'Worksheet 2'!$A$1:$B$5,2,0)

    Change the reference for 'Worksheet 2' to your actual sheet name.

    Hope this helps!

    Quote Originally Posted by angelsimpson
    Hi. I'm trying to compare columns from one sheet to another, and if there is a match, pull data in a column next to it. I tried to use the DGET, but I couldn't get it to work properly. See example below:

    Worksheet 1
    2
    4
    1
    2
    5
    4
    3

    Worksheet 2
    1 Test 1
    2 Test 2
    3 Test 3
    4 Test 4
    5 Test 5

    What I'm looking to do is have Worksheet 1 show the description next to the number, see below:
    2 Test 2
    4 Test 4
    1 Test 1
    2 Test 2
    5 Test 5
    4 Test 4
    3 Test 3


    I know that this can easily be done with sql, but I wasn't sure if I could do it that easily in excel. Thanks in advance for your help.

    Angel
    Last edited by Domenic; 06-01-2005 at 10:32 AM.

  3. #3
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Use VLOOKUP on sheet 1. Let's assume your data is in Cols A:B on sheet2 and Col A on sheet1, both beginning in row 1 through row 25.

    On sheet1, in B1 place this formula:

    =VLOOKUP(A1,Sheet2!$A$1:$A$25,2,0)

    then copy this formula down through B25

    Good Luck
    Last edited by swatsp0p; 06-01-2005 at 11:56 AM.
    Bruce
    The older I get, the better I used to be.
    USA

  4. #4
    Registered User
    Join Date
    06-01-2005
    Posts
    4

    Close...

    That was a huge help... however several of my rows are saying #N/A instead of the actual text that I was expecting, do you know what might be causing this?

    Thanks!
    Angel

  5. #5
    Registered User
    Join Date
    06-01-2005
    Posts
    4
    I just realized what is going on... when I copied the formula down my column, it actually changed the formula as it went down... for example, see a row of what my formulas are looking like... is there a way to change this?

    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)

    So by the time it gets to the bottom of my list, the "lookup" its looking at is not even valid information anymore.

    Angel

  6. #6
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  7. #7
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  8. #8
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Hmmmm, this is strange. Your Fixed data range ('Worksheet 2'!$A$1:$B$5) shouldn't change as you copy down formulas. The only reference that should change as you go down the column is A1, A2, A3... for the lookup value. The table reference should remain unchanged.

    I actually prefer to NAME my table range and use that name in my formula. Try naming your range on Sheet2. Highlight the data range that you want to use, then click Insert on the main menu, select Name then Define. Enter a name for this range (Table1) and click OK.

    Now, change your formula to read:

    =VLOOKUP(A1,Table1,2,0)

    copy this formula down column B as far as you need for the list in column A.

    HTH

  9. #9
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




  10. #10
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  11. #11
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  12. #12
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




  13. #13
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  14. #14
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




  15. #15
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  16. #16
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  17. #17
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  18. #18
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




  19. #19
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  20. #20
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  21. #21
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




  22. #22
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  23. #23
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  24. #24
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




  25. #25
    Ron Coderre
    Guest

    RE: Search and Get Function Help

    See if this works:

    On sheet1 enter this formula in B2 and copy down:
    =vlookup(A2,Sheet2!A2:B10,2,0)

    You'll need to change the references to suit your situation.

    Does that help?
    --
    Regards,
    Ron


  26. #26
    Duke Carey
    Guest

    RE: Search and Get Function Help

    use VLOOKUP() instead



    "angelsimpson" wrote:

    >
    > Hi. I'm trying to compare columns from one sheet to another, and if
    > there is a match, pull data in a column next to it. I tried to use the
    > DGET, but I couldn't get it to work properly. See example below:
    >
    > Worksheet 1
    > 2
    > 4
    > 1
    > 2
    > 5
    > 4
    > 3
    >
    > Worksheet 2
    > 1 Test 1
    > 2 Test 2
    > 3 Test 3
    > 4 Test 4
    > 5 Test 5
    >
    > What I'm looking to do is have Worksheet 1 show the description next to
    > the number, see below:
    > 2 Test 2
    > 4 Test 4
    > 1 Test 1
    > 2 Test 2
    > 5 Test 5
    > 4 Test 4
    > 3 Test 3
    >
    >
    > I know that this can easily be done with sql, but I wasn't sure if I
    > could do it that easily in excel. Thanks in advance for your help.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile: http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >
    >


  27. #27
    Daniel CHEN
    Guest

    Re: Search and Get Function Help

    If your formula like
    =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    then
    A1 will automatically changes because it uses relative address - this is
    want you want!
    Sheet1!$A$1:$A$26 should not change when you copy/paste to another place
    because it uses absolute address.
    ! You need have four "$"s to get absolute address. Sheet1!A1:A26 is a
    relative address and will auto changes. Sheet1!$A$1:$A$26 is an absolute
    address.

    ===== * ===== * ===== * =====
    Daniel CHEN

    Spreadsheet/VBA Specialist
    [email protected]
    www.Geocities.com/UDQServices
    Your "Impossible" Task Could Be Someone Else's "Piece of Cake"
    ===== * ===== * ===== * =====




    "angelsimpson" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I just realized what is going on... when I copied the formula down my
    > column, it actually changed the formula as it went down... for example,
    > see a row of what my formulas are looking like... is there a way to
    > change this?
    >
    > =VLOOKUP(A1,Sheet1!$A$1:$A$26,2,0)
    > =VLOOKUP(A2,Sheet1!$A$2:$A$27,2,0)
    > =VLOOKUP(A3,Sheet1!$A$3:$A$28,2,0)
    > =VLOOKUP(A4,Sheet1!$A$4:$A$29,2,0)
    > =VLOOKUP(A5,Sheet1!$A$5:$A$30,2,0)
    >
    > So by the time it gets to the bottom of my list, the "lookup" its
    > looking at is not even valid information anymore.
    >
    > Angel
    >
    >
    > --
    > angelsimpson
    > ------------------------------------------------------------------------
    > angelsimpson's Profile:
    > http://www.excelforum.com/member.php...o&userid=23931
    > View this thread: http://www.excelforum.com/showthread...hreadid=375625
    >




+ 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