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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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