How do I make this cell go blank when other cells are blank

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
how do I make this formula produce an empty cell in H when AF:AH are empty:
=IF(OR(E796<10,E796>27),E796,MOD(E796-1,9)+1)

I try the following but it is missing something:
=IF(SUMPRODUCT(LEN(AF796:AH796)+0)=0,""(OR(E796<10,E796>27),E796,MOD(E796-1,9)+1)
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Re: How do I make this cell go blank when other cells are bl

Given the spec...

=IF(COUNT(AF796:AH796),IF(OR(E796<10,E796>27),E796,MOD(E796-1,9)+1),"")
 
Upvote 0

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
This is good, but what if AF:AH are all equal but not blank, like all 5s (5,5,5)?
Also, the answer returned a #Value, instead of an empty cell.
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Brew said:
This is good, but what if AF:AH are all equal but not blank, like all 5s (5,5,5)?
Also, the answer returned a #Value, instead of an empty cell.

What do you have in AF796:AH796 -- text, numbers?

BTW, the formula should have been:

=IF(COUNT(AF796:AH796),IF(OR(E796<10,E796>27),E796,MOD(E796-1,9)+1),""),"")

meaning if no true numbers in AF796:AH796, give "", otherwise do: IF(OR(E796<10,E796>27),E796,MOD(E796-1,9)+1),"").
 
Upvote 0

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
Re: How do I make this cell go blank when other cells are bl

Thanks Aladin. It works
 
Upvote 0

Forum statistics

Threads
1,186,361
Messages
5,957,402
Members
438,304
Latest member
duck90

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
Top