Getting #VALUE when using IF(OR())

dagda13

New Member
Joined
May 18, 2019
Messages
33
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!
 

Toadstool

Active Member
Joined
Mar 5, 2018
Messages
436
Office Version
2016
Platform
Windows
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,""))
 

Forum statistics

Threads
1,084,851
Messages
5,380,284
Members
401,660
Latest member
Zakariyya Ibrahim

Some videos you may like

This Week's Hot Topics

Top