Calculated column to search and return multiple strings

jtpryan

New Member
Joined
May 14, 2014
Messages
23
So I have a column SUMMARY and a calculated column ISSUE. in the ISSUE column I have a DAX formula:

=IF(FIND("SSH",[Summary],1,BLANK()),"SSH",BLANK())

So each time it finds a string "SSH" in SUMMARY, it puts the string SSH in ISSUE. This works fine.

What I would like to be able to do is have it look for multiple strings and do the same thing. So if it finds XXX it puts XXX in ISSUE. If it finds YYY it puts YYY in ISSUE.

Pseudo would be (IF find "AAA" in SUMMARY then write "AAA" in ISSUE) OR (IF find "BBB" in SUMMARY then write "BBB" in ISSUE) OR (IF find "CCC" in SUMMARY then write "CCC" in ISSUE)

So in my calculated column I would have
AAA
AAA
BBB
AAA
CCC

And, of course, if none of them found, blanks.

Any help appreciated.

Jim
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Jim,

Is this what you want? A2 would be whatever your summary column is...

=IF(ISERROR(FIND("SSH",A2,1)),IF(ISERROR(FIND("XXX",A2,1)),IF(ISERROR(FIND("YYY",A2,1)),"","YYY"),"XXX"),"SSH")<strike></strike>

Regards,

CJ
 
Upvote 0
CJ,

Hey, thanks, that worked well. I do have one question though. Nested expressions like this are incredibly hard for me to follow, guess I don't have the wiring for it. Is there a trick to how to follow it? I mean, if I wanted to continue to add more strings to search for I seem to just get into trouble. Any tips would be appreciated.

Jim.
 
Upvote 0
Hi Jim:

Sorry it took so long for me to reply. Take a look at this thread: thread particularly Aladin's post #2 and my post #10 for some techniques on breaking long nested if formulas down.

If you still get stuck feel free to post back.

Regards,

CJ
 
Upvote 0

Forum statistics

Threads
1,225,726
Messages
6,186,674
Members
453,368
Latest member
xxtanka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top