+ Reply to Thread
Results 1 to 5 of 5

Find Text within Multiple Columns

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    15

    Find Text within Multiple Columns

    Hello my favorite smart people! I need your help. I am trying to look up a value in one column but need to look at 3 others to determine if the value should be there or left blank. Here is what I need:

    If B2 contains "P01" then enter qty from A2. If B2 = "none" then look at C2. If C2 contains "P01" then enter qty from A2. If both B2 and C2 are "none" then look at D2. If D2 contains "01" then enter qty from A2. If all columns fail, then leave blank.

    I have the following formula, which kind of works, but I don't know how to make it stop looking if the first (or second) cell contains the correct data.

    IF(ISNUMBER(SEARCH("P01",$B2)),$A2,IF(ISNUMBER(SEARCH("P01",$C2)),$A2,IF(ISNUMBER(SEARCH("-01",$D2)),$A2,"")))

    Column B will usually have the data, otherwise, Column C will. Both of these column's data will be the same format. Column D will always have data but in a different format. It is the last resort. All three columns are also formulas using a lookup.

    I attached a small file as an example.
    Sample for formula help.xlsx

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Find Text within Multiple Columns

    In E3, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note: EDITED, after I read the column D requirement properly!
    Last edited by Olly; 04-11-2014 at 01:14 PM.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    01-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Find Text within Multiple Columns

    Fabulous! Now, let's throw one more monkey wrench into the mix. We have now extended our search to more columns. What would I need to only have A2's qty in only one cell? See the modified attachment.

    Sorry, wrong file. Let's try again:
    Sample for formula help1.xlsx
    Last edited by Catniption; 04-11-2014 at 02:47 PM.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Find Text within Multiple Columns

    "Invalid attachment specified" when I click your link. Not sure what you mean....

  5. #5
    Registered User
    Join Date
    01-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Find Text within Multiple Columns

    Crap! I'll try again. It seems to download fine when I click it from here.
    Sample for formula help1.xlsx

    IF that doesn't work:
    This spreadsheet is huge and has 20 columns all looking at the same 3 columns to find what each ones needs. Most are looking for P0x, but some will look for S-TEXT. For those that have S-TEXT (in one of the 3 data columns)that is all I need to find. If data column B says S-TEXT, C says none and D says Planning-01, I only need the column looking for S-TEXT to populate. I do not need the column looking for "01" (as the last option) to populate at all.

+ 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. How to find duplicates on multiple columns (3 Columns )
    By Kaleemuddin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2012, 07:04 AM
  2. Lookup Data in One Column, Find Multiple Entries in Next, Copy to Multiple Columns
    By nzxt1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2010, 01:17 AM
  3. Replies: 3
    Last Post: 05-03-2010, 11:23 AM
  4. find and copy text from multiple sheets / columns
    By cfeedback in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2008, 11:35 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