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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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
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
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
Re: How do I make this cell go blank when other cells are bl

Thanks Aladin. It works
 
Upvote 0

Forum statistics

Threads
1,214,521
Messages
6,120,018
Members
448,937
Latest member
BeerMan23

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