+ Reply to Thread
Results 1 to 8 of 8

Need V-LOOKUP formula that looks for both text or numbers in different locations

  1. #1
    Forum Contributor
    Join Date
    02-18-2020
    Location
    Ottawa, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    122

    Lightbulb Need V-LOOKUP formula that looks for both text or numbers in different locations

    Hi Everyone,

    I need (I believe) a VLOOKUP formula that will look for certain text and numbers across a few different regions (columns).

    PART 1 - The first portion of this formula would look in region L(4:29). If any single one of these cells are NOT equal to either "No Action Required" or CONTAINS "Waiting". If any of these are true the output is "YES", otherwise "NO".

    PART 2 - Another portion of this same formula would look across regions B(31:36) AND O(31:36) to see if any single one of these cells DOES NOT equal "1" - If any of of these are true, the output is "YES", otherwise "NO"

    If either PART 1 or PART 2 are true, then the output would be, "YES", otherwise, "NO"


    I hope this makes sense. I have a column labelled "Action Required" that outputs various text telling me what I need to complete for that line. It might say, "Send Shipping Options to Customer" or "Create Sales Order" depending on whether I have completed other items or not. This formula will output a YES or NO on the project header that will tell me if there are any items at all that need my attention for that particular project.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,952

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    Part 1 and 2: I have trouble following your logic with NOT and TRUE and.... - you may need to switch the Yes and No to get the result you want.

    =IF(COUNTIF(L4:L29,"*waiting*")+COUNTIF(L4:L29,"No Action Required")<>26,"YES","NO")

    =IF(COUNTIF(B31:B36,1)+COUNTIF(O31:O36,1)<>12,"YES","NO")

    Combined, maybe:

    =IF(OR(COUNTIF(L4:L29,"*waiting*")+COUNTIF(L4:L29,"No Action Required")<>26, COUNTIF(B31:B36,1)+COUNTIF(O31:O36,1)<>12),"YES","NO")
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    02-18-2020
    Location
    Ottawa, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    122

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    The reason I did that is because I want the VLOOKUP looking for text that's telling me what I need to do - I have dozens of different text that might be outputted in the L(4:29) region, so its easier to check and see if there is nothing that needs to be done, rather than looking for things that do need to be done. Hope that makes sense.

    I'll try this formula that you have given me and let you know how it works!

  4. #4
    Forum Contributor
    Join Date
    02-18-2020
    Location
    Ottawa, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    122

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    So the formula doesn't quite work though I'm not sure why. Can I Ask what are the use of the <>26 and <>12 in the equation?

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,952

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    The 26 and 12 are the number of expected values in those cells. If you can have blanks instead of filled in values, then the formula would need to account for that:

    =IF(OR((COUNTIF(L4:L29,"*waiting*")+COUNTIF(L4:L29,"No Action Required"))<>COUNTA(L4:L29),( COUNTIF(B31:B36,1)+COUNTIF(O31:O36,1))<>COUNTA(B31:B36,O31:O36)),"YES","NO")

  6. #6
    Forum Contributor
    Join Date
    02-18-2020
    Location
    Ottawa, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    122

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    None of these cells are ver blank, there's always at either text (for L4:L29) or 1 or 0 for the others. Not sure why it's not working. I switched the NO + YES at the end of the formula, but the equation is always outputting NO no matter what is in any of the cells.

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,952

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    I don't know what to tell you:

    =IF(OR((COUNTIF(L4:L29,"*waiting*")+COUNTIF(L4:L29,"No Action Required"))<>COUNTA(L4:L29),( COUNTIF(B31:B36,1)+COUNTIF(O31:O36,1))<>COUNTA(B31:B36,O31:O36)),"YES","NO")

    worked perfectly for me - the formula is in the green cell: attach a sanitized (No CoViD-19!) workbook to your reply if you still can't get it to work....

    Snip 1.JPG
    Snip 2.JPG
    Snip 3.JPG
    Last edited by Bernie Deitrick; 03-19-2020 at 12:21 PM.

  8. #8
    Forum Contributor
    Join Date
    02-18-2020
    Location
    Ottawa, ON
    MS-Off Ver
    Professional Plus 2010
    Posts
    122

    Re: Need V-LOOKUP formula that looks for both text or numbers in different locations

    Perfect! This formula works. I just copied it in and tried it! Thanks so much for helping with this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using INDEX MATCH in VBA with Variable Lookup Locations
    By jgodoyle2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2019, 01:06 PM
  2. [SOLVED] Lookup formula to separate dates/numbers out of a text string
    By kdestef1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-20-2018, 03:38 PM
  3. v lookup to pick up location numbers against locations
    By geraldccole in forum Excel General
    Replies: 3
    Last Post: 01-17-2017, 12:50 PM
  4. Using a lookup function on inconsistent data locations
    By apex_predetor1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-05-2013, 11:51 AM
  5. [SOLVED] Pickup/Lookup Data from Various Locations/Cells and Concentrate it.
    By Everest in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-18-2012, 09:31 AM
  6. Lookup both text and numbers
    By davidtla in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2008, 08:26 AM
  7. Lookup both text and numbers
    By Peinecone in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2007, 07:38 AM

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