If then else with 3 criteria's

rcb007

Board Regular
Joined
Nov 12, 2020
Messages
90
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a formula which would allow for 3 different cases.
If the target cell is blank, it would return as blank.
If the target cell has a Keyword [Existing Utility], I would use a wild card to search for it (Ex*Util*)
If the target cell does not have any of the above to run a match and index.
Capture.JPG


=IF(A3="","",(IF(ISNUMBER(FIND("Ex*Util*",A3)),(INDEX(E2:E6,MATCH(A3,D2:D6))),(INDEX(H2:H6,MATCH(A3,G2:G6))))))

Thank you for any help.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try changing FIND to SEARCH
 
Upvote 0
Try changing FIND to SEARCH
Thank you for the idea of the swap. It seemed to get a better result than that of before. Am I going to need individual names instead of using a wild card to collect some of these values?

=IF(A2="","",(IF(ISNUMBER(SEARCH("Ex*Util*",A2)),(INDEX($E$2:$E$10,MATCH(A2,$D$2:$D$10))),(INDEX($H$2:$H$10,MATCH(A2,$G$2:$G$10))))))

Capture.JPG
 
Upvote 0
Within the D Column, I am wanting to use a wildcard selection if possible. Within the D Column are some sample Names. Depending on the circumstance, there could be some or all of those names, but I do need them to pull from that side of the table.
 
Upvote 0
Change the MATCH to XMATCH
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,673
Members
449,179
Latest member
fcarfagna

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