+ Reply to Thread
Results 1 to 10 of 10

Combine 2 IF formula return 2 different value

Hybrid View

faizzsheikh Combine 2 IF formula return 2... 08-30-2022, 03:09 PM
JohnTopley Re: Combine 2 IF formula... 08-30-2022, 03:16 PM
faizzsheikh Re: Combine 2 IF formula... 08-30-2022, 03:19 PM
dosydos Re: Combine 2 IF formula... 08-30-2022, 03:46 PM
faizzsheikh Re: Combine 2 IF formula... 08-30-2022, 04:29 PM
dosydos Re: Combine 2 IF formula... 08-31-2022, 08:23 AM
faizzsheikh Re: Combine 2 IF formula... 09-02-2022, 07:46 AM
Fluff13 Re: Combine 2 IF formula... 09-02-2022, 07:52 AM
faizzsheikh Re: Combine 2 IF formula... 09-02-2022, 08:23 AM
Fluff13 Re: Combine 2 IF formula... 09-02-2022, 08:26 AM
  1. #1
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Combine 2 IF formula return 2 different value

    I have a list of such titles about 2000

    A1: Titles
    A2: 10 Facebook Marketing Ideas for Small Business
    A3: 10 Fun Facts About Social Media
    A4: 10 Fitness Tips for Health Life

    And I have about 20 popular singular word from the above title that I want to use as tags for each title
    B1: Popular Singular Words in The List of 2000 titles (there are 20 such words)
    B2: Business
    B3: Social
    B4: Health
    B5: Fitness
    B6: Marketing
    B7: Facebook


    In C2 I want to return multiple values i.e Marketing, Business, Facebook these are the 3 tags assigned to the title in A2. Since I only have 20 popular words to tag, is there a way I can combine the below formula 20 times in single cell and return multiple values separated by comma maybe by using concatinate.

    =IF((ISNUMBER(SEARCH(B2,A2))),B2,"")
    Last edited by faizzsheikh; 08-30-2022 at 03:20 PM.

  2. #2
    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
    30,711

    Re: Combine 2 IF formula return 2 different value

    Are you still using Excel 2007: if not, please update your profile with current version,
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Combine 2 IF formula return 2 different value

    Thanks for reminding, just updated. I am using 2010
    Last edited by AliGW; 09-02-2022 at 08:30 AM. Reason: Please DON'T quote unnecessarily!

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    MA, USA
    MS-Off Ver
    365(PC) V:2412
    Posts
    1,475

    Re: Combine 2 IF formula return 2 different value

    In C2 try this array formula. Use CTRL + SHIFT + Enter when confirming the formula. If done so correctly { } will be added around your formula automatically. Then drag the formula down.

    Formula: copy to clipboard
    =TRIM(CONCAT(IF(ISERR(SEARCH($B$2:$B$7,$A2)),"",$B$2:$B$7&" ")))
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  5. #5
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Combine 2 IF formula return 2 different value

    Its not working

    Attachment 794131
    Last edited by AliGW; 09-02-2022 at 08:29 AM. Reason: Please DON'T quote unnecessarily!

  6. #6
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    MA, USA
    MS-Off Ver
    365(PC) V:2412
    Posts
    1,475

    Re: Combine 2 IF formula return 2 different value

    Cant see the attached image in your previous post. I changed CONCAT to an older version CONCATENATE function which should work on your excel version.
    Again still an array formula so use CTRL + SHIFT + ENTER.

    Formula: copy to clipboard
    =TRIM(CONCATENATE(IF(ISERR(SEARCH($B$2:$B$7,$A2)),"",$B$2:$B$7&" ")))

  7. #7
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Combine 2 IF formula return 2 different value

    It returns the first value only, A2 has 3 words from col B. Business, Facebook, Marketing. I was looking for a formula/solution that return all 3 words in cell C2. Also when I drag the formula down the column it doesn't work, it returns empty.

    Screenshot: https://i.ibb.co/dWbcH9n/excel.jpg
    Last edited by AliGW; 09-02-2022 at 08:30 AM. Reason: Please DON'T quote unnecessarily!

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,739

    Re: Combine 2 IF formula return 2 different value

    For xl2010 you will need to test each cell individually like
    Formula: copy to clipboard
    =MID(IF((ISNUMBER(SEARCH($B$2,A2))),","&$B$2,"")&IF((ISNUMBER(SEARCH($B$3,A2))),","&$B$3,"")&IF((ISNUMBER(SEARCH($B$4,A2))),","&$B$4,""),2,1000)

  9. #9
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Combine 2 IF formula return 2 different value

    You are right 2010 is a bit outdated for this. I tried the first formula provided by @dosydos In excel at live.com and it worked. This is a great help for me it's going to save me a huge lot of time, I will be using this very frequently. Thanks a lot, guys! I love this forum. 珞
    Last edited by AliGW; 09-02-2022 at 08:30 AM. Reason: Please DON'T quote unnecessarily!

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,739

    Re: Combine 2 IF formula return 2 different value

    Glad to help & thanks for the feedback.

+ 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: 11-12-2019, 08:22 PM
  2. SUMIF combine with different file return VALUE error
    By greg151091 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2017, 03:39 PM
  3. Return value based on name combine score if same name
    By SVTF in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-28-2014, 12:38 PM
  4. How to combine the selected items of a list and return in a cell
    By 1tane1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2014, 06:37 AM
  5. how to combine a single period return formula & a multiple period formula?
    By uptickdk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-27-2013, 02:34 PM
  6. Macro to combine and return values
    By meleo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2012, 09:59 PM
  7. Replies: 3
    Last Post: 04-15-2010, 08:36 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