+ Reply to Thread
Results 1 to 2 of 2

If / Vlookup command not working

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    Meerssen
    MS-Off Ver
    Excel 2007
    Posts
    1

    If / Vlookup command not working

    Hello,

    I got 2 pages in my excel.
    1 is a list where things based on SSO have to be automaticy filled in from the Cat1 Page.

    Now i got a formula, but it is not working.

    It got to be, when i fill in an SSO a few items have to be filled in, like: Number, and name, building depending on the SSO

    Please Help. What am i doing wrong?
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: If / Vlookup command not working

    Well, there are a couple of problems. The formula is: =IF($C$29="","",VLOOKUP($C$29,Cat1!$A$2:$O$32,2))

    So, you are searching column A for the data in cell C29 which is labelled as a User ID. The cell C29 contains "test" which does not appear anywhere on the Cat1 sheet so it would fail anyway. However, VLOOKUP always searches the first column defined which, in this case, is column A and that contains dates, not SSO numbers (whatever they are).

    You really need to use INDEX/MATCH to return the data that you want. I can't really advise you of the exact formulae because your form doesn't really tie in with what you are describing.

    Let's say the SSO number is in cell C4 and you want to return the Asset Number, you would use:

    =IF(F4="","",INDEX(Cat1!B:B,MATCH(F4,Cat1!N:N,0)))

    So, you are matching cell F4 against column N, the SSO Number, and returning the indexed value from column B, the Asset Number.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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.6.0 RC 1