Creating blank cells

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
How do you update the following formulas to give you an empty or blank cell answer,
if AF, AG and AH are empty or blank cells in that row.
=IF(AG859=AH859,IF(AF859<>AG859,"A","A"),"A")

=IF(AND(AG859=AH859,AG859=AF859),"A",IF(AND(AF859<>AH859,AG859<>AF859,AG859<>AH859),"B",IF(AND(AF859=AG859,AH859<>AF859,AH859<>AG859),"A",IF(AND(AG859=AH859,AF859<>AG859,AF859<>AH859),"B",IF(AND(AF859=AH859,AG859<>AF859,AG859<>AH859),"B","A")))))

=IF(AND(AH859=AF859,AH859=AG859),"A",
IF(AND(AF859<>AG859,AH859<>AF859,AH859<>AG859),"C",
IF(AND(AF859=AG859,AH859<>AF859,AH859<>AG859),"B",
IF(AND(AF859=AH859,AG859<>AF859,AG859<>AH859),"A",
IF(AND(AG859=AH859,AF859<>AG859,AF859<>AH859),"B","A")))))

Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Do you mean something like:

=IF(LEN(AF859 & AG859 & AH859)=0,"","A")
 
Upvote 0
Your formula produces an error, and I'm not sure which of the 3 formula your solution will update. How would I update these 3 formulas to be blank cells if cells AF, AG and AH for that row is blank.

Formula #1
=IF(AG859=AH859,IF(AF859<>AG859,"A","A"),"A")

Formula #2
=IF(AND(AG859=AH859,AG859=AF859),"A",IF(AND(AF859<>AH859,AG859<>AF859,AG859<>AH859),"B",IF(AND(AF859=AG859,AH859<>AF859,AH859<>AG859),"A",IF(AND(AG859=AH859,AF859<>AG859,AF859<>AH859),"B",IF(AND(AF859=AH859,AG859<>AF859,AG859<>AH859),"B","A")))))

Formula #3
=IF(AND(AH859=AF859,AH859=AG859),"A",
IF(AND(AF859<>AG859,AH859<>AF859,AH859<>AG859),"C",
IF(AND(AF859=AG859,AH859<>AF859,AH859<>AG859),"B",
IF(AND(AF859=AH859,AG859<>AF859,AG859<>AH859),"A",
IF(AND(AG859=AH859,AF859<>AG859,AF859<>AH859),"B","A")))))

Thanks
 
Upvote 0
How do you update the following formulas to give you an empty or blank cell answer,
if AF, AG and AH are empty or blank cells in that row.

My formula answers the question above. There is nothing inherent to the formula that would cause an error. Are you sure you typed it in correctly? Are there errors in the cells AF859, AG859, or AH859? What kind of error are you getting?
 
Upvote 0
Hi, Try these, I have changed from your row 859 to row 5 to save effort:

Formula #1: =IF(AND(AF5="",AG5="",AH5=""),"",IF(AG5=AH5,IF(AF5<>AG5,"A","A"),"A"))

Formula #2: =IF(AND(AF5="",AG5="",AH5=""),"",IF(AND(AG5=AH5,AG5=AF5),"A",IF(AND(AF5<>AH5,AG5<>AF5,AG5<>AH5),"B",IF(AND(AF5=AG5,AH5<>AF5,AH5<>AG5),"A",IF(AND(AG5=AH5,AF5<>AG5,AF5<>AH5),"B",IF(AND(AF5=AH5,AG5<>AF5,AG5<>AH5),"B","A"))))))

Formula #3: =IF(AND(AF5="",AG5="",AH5=""),"",IF(AND(AH5=AF5,AH5=AG5),"A",
IF(AND(AF5<>AG5,AH5<>AF5,AH5<>AG5),"C",
IF(AND(AF5=AG5,AH5<>AF5,AH5<>AG5),"B",
IF(AND(AF5=AH5,AG5<>AF5,AG5<>AH5),"A",
IF(AND(AG5=AH5,AF5<>AG5,AF5<>AH5),"B","A"))))))

I hope I understood your question right

Quicker still just insert: IF(AF5&AG5&AH5="","", between the = sign and the first IF in each of your formula and add an extra ) at the end of the formula
 
Upvote 0
Thank you both Fergus and Jimikey,

for your help. Fergus, I got your method to work.
 
Upvote 0
Not sure if you want comment this but there is a lot of room for simplifications in your formula as you post them in your first post:

Formula #1 can be simplified to:

="A"

Formula #2 can be simplified to:

=IF(AG859=AF859,"A","B")

Formula #3 looks like:

=IF(AND(AH859=AF859,AH859=AG859),"A",
IF(AND(AF859<>AG859,AH859<>AF859,AH859<>AG859),"C",
IF(AF859=AH859,"A","B")))

Don't have Excel to test this analyzis, but this is what it looks like...could be wrong
 
Upvote 0
Goblin, your are correct. This change to the formula
is more efficient. Thank you
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

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