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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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