Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi all

    I am having a real dumb moment, in the attached workbook I have a Combobox in B7 and B13 and using a VLOOKUP I can populate cells below them with the correct information.

    But in B34 and B37 I cannot for the life of me get the adjacent cells to populate, I thought perhaps I might have to use HLOOKUP but that does not seem to be the case.

    I would really appreciate some pointers

    Thanks
    Attached Files Attached Files
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The difference is you're looking up text values from B7 and B13 and numeric values from B34 and B37. But the value of a cell linked to a combo box is text.
    To get around this, use the VALUE function to convert the text value to a number (the example is for D34):

    =IF($B$34="","",VLOOKUP(VALUE($B$34),ShipmentDatab ase!$A$3:$E$104,2,FALSE))

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    You need to be consistent either both text or both numbers to match. Since you put in the DGN sheet as text, format the Shipment data sheet values as text as well.

    Steve

  4. #4
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='798546' date='17-Oct-2009 15:55']The difference is you're looking up text values from B7 and B13 and numeric values from B34 and B37. But the value of a cell linked to a combo box is text.
    To get around this, use the VALUE function to convert the text value to a number (the example is for D34):

    =IF($B$34="","",VLOOKUP(VALUE($B$34),ShipmentDatab ase!$A$3:$E$104,2,FALSE))[/quote]

    Hi Hans

    Thank you very much, sorry for the tawdry response but I am currently on secondment in Singapore. It really beats me how guys like tou and Steve know all of this stuff, I can't even find it in the help files.

    Thanks again
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

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