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
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,974
Office Version
  1. 365
Platform
  1. Windows
Do you mean something like:

=IF(LEN(AF859 & AG859 & AH859)=0,"","A")
 

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
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
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,974
Office Version
  1. 365
Platform
  1. Windows
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?
 

Fergus

Well-known Member
Joined
Mar 10, 2004
Messages
1,174

ADVERTISEMENT

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
 

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
Thank you both Fergus and Jimikey,

for your help. Fergus, I got your method to work.
 

goblin

Active Member
Joined
Apr 16, 2003
Messages
469
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
 

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
Goblin, your are correct. This change to the formula
is more efficient. Thank you
 

Watch MrExcel Video

Forum statistics

Threads
1,123,271
Messages
5,600,651
Members
414,399
Latest member
Ninjee

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