Using IF(SEARCH) for ~ and Regular IF in Nested Formula

jmdiva

New Member
Joined
Feb 15, 2018
Messages
7
Excel%20pic_zpsjafxktkh.png.html
Excel%20pic_zpsjafxktkh.png.html
Excel%20pic_zpsjafxktkh.png.html
Excel%20pic_zpsjafxktkh.png.html
I'm trying to do a nested IF statement but also include an IF(SEARCH) in the same formula.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]$15[/TD]
[TD]$1000[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]$25[/TD]
[TD]$100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]~$30[/TD]
[TD]$75[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



For example, Column A will occasionally include ~ for dollar amounts that are estimates. In Column C I'm trying to solve for the following criteria:

=IF(A2="","D&I"
=IF(A2>B2,"Raise","No Action")
=IF(SEARCH("~~",A2),"N/A"

I tried combining them like this: =IF(SEARCH("~~",A2),"N/A",IF(A2="","D&I",IF(A2>B2,"Raise","No Action")))

But every time I get an error. Some help on this would be greatly appreciated!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the Board!

Maybe:

=IF(A2="","D&I",IFERROR(IF(A2+0>B2,"Raise","No Action"),"N/A"))
 
Last edited:
Upvote 0
Glad to help! :cool:

I used a trick (the IFERROR and the +0) to avoid using the SEARCH, but you can also fix up your version with the ISNUMBER function:

=IF(ISNUMBER(SEARCH("~~",A2)),"N/A",IF(A2="","D&I",IF(A2>B2,"Raise","No Action")))
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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