+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] Lookup function

  1. #1
    Registered User
    Join Date
    12-10-2008
    Location
    Huntsville, ON
    Posts
    2

    Question [SOLVED] Lookup function

    Hi there,

    I have a spreadsheet with 2 worksheets. On the first "active parts" I have a list of active part numbers and on the second "All Parts" I have all of the parts available.

    I want to compare every part in the All Parts worksheet to see if the part number exists on the Active Parts sheet - if it's there, I would like it to return the value "Active" in column B in All Parts. I have a formula in column B in All Parts that seems to work for the first few, but as soon as it finds one that is active, the rest of the cells below all return "Active".

    Any help you could provide would be appreciated

    Thanks,

    Joanne
    Attached Files Attached Files
    Last edited by Skaven; 12-10-2008 at 11:40 AM. Reason: Problem solved

  2. #2
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379
    This should work:

    =VLOOKUP(A2,'Active Parts'!$A$2:$B$9,2,FALSE)

    EDIT:

    If you want to prevent the #N/A error then use this:

    =IF(ISNA(VLOOKUP(A2,'Active Parts'!$A$2:$B$9,2,FALSE)),"NA",VLOOKUP(A2,'Active Parts'!$A$2:$B$9,2,FALSE))
    Last edited by ChrisMattock; 12-10-2008 at 11:33 AM. Reason: Additionally...

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    try
    =VLOOKUP(A2,'Active Parts'!$A:B,2,FALSE) instead

  4. #4
    Registered User
    Join Date
    12-10-2008
    Location
    Huntsville, ON
    Posts
    2
    Perfect, thank you!!!!!

    Quote Originally Posted by ChrisMattock View Post
    This should work:

    =VLOOKUP(A2,'Active Parts'!$A$2:$B$9,2,FALSE)

    EDIT:

    If you want to prevent the #N/A error then use this:

    =IF(ISNA(VLOOKUP(A2,'Active Parts'!$A$2:$B$9,2,FALSE)),"NA",VLOOKUP(A2,'Active Parts'!$A$2:$B$9,2,FALSE))

+ 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