+ Reply to Thread
Results 1 to 10 of 10

I challenge thee: IF statement for text search with multiple conditions - Help requested

  1. #1
    Registered User
    Join Date
    08-07-2015
    Location
    Plymouth, England
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Exclamation I challenge thee: IF statement for text search with multiple conditions - Help requested

    Hi there

    I'm looking for some help with an IF statement to define a large (70k+) list of customer I.D's by their order type each week, it's either "Box Only", "Extras Only" or "Both" (as in both boxes and extras), this has already been defined using a different IF statement from the raw data.

    Some customers change their order each week, so I want to be able to use a formula to assign a definition to each customer, that identifies them as one of 6 types:

    "switches between boxes only and extras-only" if the string contains "Boxes Only" and "Extras Only"
    "loyal boxes only customer" if the string only contains "Boxes Only"
    "loyal extras only customer" if the string only contains "Extras Only"
    "switches between boxes only and both" if the string contains "Boxes Only" and "Both" but not "Extras Only"
    "switches between extras only and both" if the string contains "Extras Only and "Both" but not "Boxes Only"
    "always orders both" if the string only contains "Both"

    ("No Order" can be ignored)

    An example of the data is below, for three customers between weeks 21-32:

    data.PNG

    I appreciate this is quite complex, but I hope there's someone who can just help me piece it together, as I'm still learning the language of IF statements.

    Thank you in advance for your help!

    Monkeyseemonkeytype

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    There is little point in attaching pictures to posts here - many contributors are not able to view them, and any potential helpers would like to play about with formulae to test out solutions for you, and you can't do that with a picture. You should attach a sample Excel workbook instead.

    Pete

  4. #4
    Registered User
    Join Date
    08-07-2015
    Location
    Plymouth, England
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Thank for your replies, I'm new to this forum so wasn't aware. Hope this data sample is sufficient.

    Thanks

    example workbook 1.xlsx

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,150

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Do you ignore "No order" i.e. do we test for this condition?

  6. #6
    Registered User
    Join Date
    08-07-2015
    Location
    Plymouth, England
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Hi, no that's right, we don't need to test for the condition of "No Order".

    Thanks
    Last edited by Monkeyseemonkeytype; 08-07-2015 at 08:51 AM.

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Please,don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,150

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    See the attached and the table: all formulas are a variant on the one below

    =IF(AND(COUNTIF($B6:$M6,"Box Only"),COUNTIF($B6:$M6,"Extras Only"),COUNTIF($B6:$M6,"Both")=0),"TRUE","")
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-07-2015
    Location
    Plymouth, England
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Thumbs up Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Hi JohnTopley,

    I've just applied this to the rest of the data and it's worked brilliantly, thank you I'm extremely grateful! It'll be really useful to refer back to the formula you've provided for similar issues.

    Thanks again
    Last edited by Monkeyseemonkeytype; 08-07-2015 at 09:54 AM.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,150

    Re: I challenge thee: IF statement for text search with multiple conditions - Help request

    Glad you have a solution.

    Can you mark the tread SOLVED ("Thread Tools" on the first thread posting).

    Thank you.

+ 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. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  2. Replies: 2
    Last Post: 10-16-2014, 11:35 AM
  3. If statement formula for range not changing requested cell to yes
    By Exceldope in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-20-2012, 12:14 PM
  4. A challenge, Serious help requested
    By dps9460 in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 06-03-2006, 04:50 PM
  5. [SOLVED] Search for text strings with multiple conditions
    By minismood in forum Excel General
    Replies: 2
    Last Post: 05-09-2006, 09:35 AM
  6. [SOLVED] If statement using multiple conditions
    By SCOOBYDOO in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 02:05 AM
  7. If statement using multiple conditions
    By SCOOBYDOO in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 12:05 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