+ Reply to Thread
Results 1 to 4 of 4

Using IF & VLOOKUP in one formula for value comparison (includes example workbook)

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    Illinois
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    86

    Using IF & VLOOKUP in one formula for value comparison (includes example workbook)

    Table 1

    Element Category 1 Category 2
    Ac-227 540 16


    Table 2 (on different worksheet)
    Element Activity NTS Status
    Ac-227 16 Category 2
    Ac-227 15 Not NTS
    Ac-227 550 Category 1

    The above example is a simple example of what I am trying to do. I want to use vlookup and if/then statement so that in the column NTS Status, it will tell me if the element listed in Table 2 is Category 1, Category 2, or Not NTS, based on its activity value. So in the above example, Ac-227 is Category 1 if the value is greater than OR equal to 540, Category 2 if the value is greater than or equal to 16, and if below 16, I want it to say "Not NTS". I did attempt to create a formula but I definitely made some errors and forgot some things but here is the formula (based of my specific workbook and not the example I used):

    PHP Code: 
    =VLOOKUP(C3,'10CFR20_App_E_NTS'!A3:C22,1,FALSE))) 
    I probably should've included some ">=" signs and maybe some other stuff, but hopefully this formula won't require too much editing to fix. Thanks for your help.

    -HP RodNuclear
    Attached Files Attached Files
    Last edited by HP RodNuclear; 04-06-2011 at 12:44 PM. Reason: Needed example workbook

  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,409

    Re: Using IF & VLOOKUP in one formula for value comparison

    It would be easier to check and edit in the context of a sample workbook with some typical data.


    Regards
    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


  3. #3
    Registered User
    Join Date
    11-04-2010
    Location
    Illinois
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    86

    Re: Using IF & VLOOKUP in one formula for value comparison (includes example workbook

    Here is an example...sorry about that.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-04-2010
    Location
    Illinois
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    86

    Re: Using IF & VLOOKUP in one formula for value comparison (includes example workbook

    Ok, well I tried the following formula to see if it would work better but it keeps giving me a circular reference error. What I attempted to do was use two if statements that basically say if the value in the second sheet of the corresponding element is greater than the value in column 2 of the FIRST sheet, then tell me it's "Category 1". If the value in the second sheet is greater than the value in column 3 of the corresponding element, then tell me it's "Category 2" and then otherwise, tell me "NOT NTS", but it isn't working...see formula below
    =IF((B2>VLOOKUP(A2,'10CFR20_App_E_NTS'!A2:C21,2,FALSE)),C2="Category 2",IF((B2>VLOOKUP(A2,'10CFR20_App_E_NTS'!A2:C21,3,FALSE)),C2="Category 1","NOT NTS"))

+ 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