Getting #VALUE when using IF(OR())

dagda13

Board Regular
Joined
May 18, 2019
Messages
52
Hi,

I'm trying to return the value of a couple cells, depending upon whether or not they contain a value. I'm using the formula below:

=IF(OR(IF(NOT(ISBLANK(SEARCH($BP$2,B2))),$BP$2,""),IF(NOT(ISBLANK(SEARCH($BP$3,B2))),$BP$3,"")),"")

The idea is that either BP2 or BP3 will contain a value, or if neither of them contain a value, the returned value will be blank. In this case, whether or not BP2 or BP3 contain a value or not, I'm getting #VALUE .

I'm expecting the returned value to be whatever value BP2 or BP3 has, or blank. But I don't understand why I'm getting #VALUE .

Any help would be very much appreciated!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I'm not sure why you're referencing B2 but does this do what you want?
=IF(ISNUMBER($BP$2),BP2,IF(ISNUMBER($BP$3),BP3,""))
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,443
Members
448,898
Latest member
drewmorgan128

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