+ Reply to Thread
Results 1 to 10 of 10

Two Part Problem with IF and Substitute

  1. #1
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Two Part Problem with IF and Substitute

    Hello Excellers,

    I've encounter some issues dealing with a spreadsheet that I've been working on...I enclosed the spreadsheet within this post...

    In tab titled "Problem 1" I'm seeking a method to switch symbols with text into another symbol (i.e if text has # then change to ?) I've tried using an If with Substitute formula but it would just return an error. I even tried using a table to check the text against but still received errors. The second issue is on the tab titled "Problem 2" I have a bunch of words in which I would like to check those against a list and if the word doesn't have any of the words from the list then create it. I've used an Index-Match function but it didn't return the desired results. I've enclosed a spreadsheet that has both this problems any help on one or both of these problems would be greatly appreciated.

    Thank you for your time
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Two Part Problem with IF and Substitute

    Enter formula in F3 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Two Part Problem with IF and Substitute

    @ AlKey

    I'm surprised to find that the ISNUMBER wrapped around FIND is necessary. (I made that change to my formula, and it did the trick.)

    I would think that any non-zero number returned by FIND would be sufficient for a TRUE test. Clearly it's not. Can you tell us why this is?

    Thanks,
    Dave
    Last edited by FlameRetired; 08-19-2016 at 10:16 PM.
    Dave

  4. #4
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Re: Two Part Problem with IF and Substitute

    Thanks AlKey this solution worked perfectly!

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Two Part Problem with IF and Substitute

    So problem #1 has been solved.

    For problem #2, try this array formula in F2:
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Drag down as far as needed.
    Quang PT

  6. #6
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Re: Two Part Problem with IF and Substitute

    Hello bebo021999,

    Thank You for taking time to solve this, and yes the 1st problem has been solved. I tried you solution and it worked but when I used two words instead of one then it doesn't work. For example when the word "apple" is used the formula works great but if I used "apple recipes" then an error occurs..I enclosed a file of this example
    Attached Files Attached Files

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Two Part Problem with IF and Substitute

    O I got it. Let define:
    K column: list of children
    B column: mixture of parent and children
    what are parent items: those are strings have no children at the end.
    For example:
    Apple: Parent, but
    Apple Sugar: Children
    Apple baking: Parent
    Cabbage receipe: Parent, but
    Cabbage receipe Sauce: Chilren

    Do you agree with this?

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Two Part Problem with IF and Substitute

    This is what I got so far with formula solution, I think a helper column is needed (column A) to identify the parent items.
    But with VBA solution, it is faster and helper unneeded and tell me if you need.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Re: Two Part Problem with IF and Substitute

    I think but let me provide an another example so we're both on the same page..

    For Example:
    List 1:
    Orange
    Apple Sugar
    Kiwi Salt
    Grapes Pepper
    Grape Cooking

    List 2:
    Sugar
    Salt

    The goal would be (list 3): Append words from List 1 to List 2 if none of the words are present in list 1
    List 3
    Orange Sugar
    Orange Salt
    Grapes Pepper Salt
    Grapes Pepper sugar
    Grapes Cooking Sugar
    Grapes Cooking Salt

  10. #10
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Re: Two Part Problem with IF and Substitute

    Hello @ bebo021999

    Thank you for taking the time to find a solution for this problem after experimenting with your solution (the one that included the helper column) I found that it worked very well for what I needed...If you do happen across this message I am interested into how you would go about creating a vba for this...

    Thanks again..

+ 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. Substitute a part of text
    By neurone84 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-23-2016, 08:18 PM
  2. [SOLVED] Remove duplicates of substitute part number
    By costi_linho12 in forum Excel General
    Replies: 11
    Last Post: 02-07-2015, 01:09 PM
  3. [SOLVED] Concatenate & substitute problem
    By norm01 in forum Excel General
    Replies: 2
    Last Post: 03-08-2013, 11:31 AM
  4. SUBSTITUTE problem
    By MrRed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2012, 12:18 PM
  5. =SUBSTITUTE Problem
    By seanjacob in forum Excel General
    Replies: 3
    Last Post: 09-23-2010, 06:04 AM
  6. Replies: 1
    Last Post: 08-20-2010, 05:14 AM
  7. Indirect substitute problem
    By RooTFantastic in forum Excel General
    Replies: 1
    Last Post: 02-17-2009, 06:10 PM

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