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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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),"")
 

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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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),"").
 

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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,871
Messages
5,766,855
Members
425,380
Latest member
CubeGirl

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