Change Cell Color if more than one has a value, or if another has no value.

UncleBajubjubs

Board Regular
Joined
Jul 11, 2017
Messages
107
Good morning, I have a table with 4 columns where columns A, B, and C can have an amount of money, and D a text string. It's intended that the the user will put in an amount of money into one of A, B, or C, and they will enter a value into column D for any rows that have anything in the previous columns.

In this table as an example, rows 1 and 2 are filled out correctly, but row 3 is wrong because both A and C have a value, and row 4 is wrong because there is a value in B, but nothing in D.
56E1
22G6
7134B2
65

How might I set it so that so cells A, B, and C will be highlighted if more than 1 of the 3 have values, and D will be highlighted if there is no label when 1 of A,B, or C have a value?
Thanks
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Saurabhj

Active Member
Joined
Jun 6, 2020
Messages
413
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

Use conditional formatting:
For A1 to C4
Excel Formula:
=COUNTA($A2:$C2)>1

For D1 to D4
Excel Formula:
=Isblank($D2)
 

Attachments

  • conditionalFormattingCountA.JPG
    conditionalFormattingCountA.JPG
    106.9 KB · Views: 1
Solution

UncleBajubjubs

Board Regular
Joined
Jul 11, 2017
Messages
107
Thanks, that works pretty great!

Is there way to make it not count cells that have "0" in them? If I have 2 and 0 in A and B, that makes it format.
 

Saurabhj

Active Member
Joined
Jun 6, 2020
Messages
413
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Thanks for the feedback.

Are you saying that if A, B, or C contains 0 this should also be considered as blank.
 

UncleBajubjubs

Board Regular
Joined
Jul 11, 2017
Messages
107
Correct, if a row has 0, 2, and 0, that should be considered correctly filled out, and thus not format.
Thanks
 

Saurabhj

Active Member
Joined
Jun 6, 2020
Messages
413
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

Check below:

Excel Formula:
=AND(COUNTA($A2:$C2)>1,SUM($A2:$C2)>MAX($A2:$C2))
 

Watch MrExcel Video

Forum statistics

Threads
1,127,225
Messages
5,623,488
Members
415,973
Latest member
charlesbm

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