+ Reply to Thread
Results 1 to 8 of 8

Search rows for words and return "Yes"

Hybrid View

  1. #1
    Registered User
    Join Date
    03-11-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    4

    Search rows for words and return "Yes"

    Hi all,

    Im new around here. I tried to look if this has been asked/answered before but couldn’t find anything.

    I need to do a search of a spreadsheet and see if any row has “white” in column B and “priority” in column I, return value yes in a different cell.
    I have tried a few ways and can get it to do either search individually and search column B and I for them words but not if they are in the same row.

    Any help would be greatly appreciated.

    Thanks

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Row contains this and that

    Give this a try

    =IF(AND(B1="white",I1="priority"),"Yes","No")
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    03-11-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    4

    Re: Row contains this and that

    Thanks for the speedy reply
    That works, however the spreadsheet is populated daily and averages 300 lines a day is there a way of doing this for every line without specifying b1, b2, b3, etc?

    Thanks in advance

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Search rows for words and return "Yes"

    Not readily seeing how that is possible. Excel is looking for TRUE and FALSE, but how are we going to tell the formula to look at a word if it is not in a cell.

    Maybe you can explain a little more on what you are trying to achieve and why pointing to a cells or cells will not work for you?

  5. #5
    Registered User
    Join Date
    03-11-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    4

    Re: Search rows for words and return "Yes"

    I will try to add a demo of the spread sheet.
    The reason it will be difficult to do pointing at cells is because the spreadsheet being 300 rows long (Currently and will be doubling soon) looking at every cell would mean the formula would be huge. for example for 5 lines alone it would be

    =IF(AND(B1="white",I1="priority",B2="white",I2="priority",B3="white",I3="priority,B4="white",I4="priority),B5="white",I5="priority)))),"Yes","No")

    In the full spreadsheet there is 300 lines and 23 different colours to search for.
    In the demo you can see I would like the result in M2 for White, M3 For Blue etc

    I hope this makes sense?
    Attached Files Attached Files

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Search rows for words and return "Yes"

    Thank you for your spreadsheet example as that does clear things up. How's this?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-11-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    4

    Re: Search rows for words and return "Yes"

    You are a god.

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Search rows for words and return "Yes"

    Glad this has helped you out and thanks for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] Search for multiple words in row and return searched value if found in first cell
    By whomewhy in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-02-2018, 05:21 PM
  2. [SOLVED] search for rows in table that contains all words from a string
    By moosmahna in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-24-2017, 03:53 AM
  3. Replies: 2
    Last Post: 01-19-2016, 09:40 AM
  4. Replies: 13
    Last Post: 06-25-2014, 09:48 AM
  5. A word search to return words found in given fields
    By JonBrett in forum Excel General
    Replies: 2
    Last Post: 03-28-2014, 10:16 PM
  6. Search for Identifier Words and Return a Specific Value
    By uberathlete in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2014, 07:29 PM
  7. Replies: 2
    Last Post: 02-17-2011, 10:15 PM

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