conditional summing and formatting

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,846
Office Version
  1. 365
Platform
  1. Windows
Columns C and D occupies labor hours. Some technicians hours are on both columns. (Names of tech are in Column B), I want to add the hours in another columns only if the tech's hours are in both of the columns. So for example Daniel B20, hours 142 are in C20 and 35 in D20, I want to highlight those hours as well as sum of those, and I want blank if the condition did not meet. something like,

=IF(AND(C20<>"",IF(D20<>"",SUM(C20:D20),""))

OR

=IF(C20,C20+D20,"") - if D20 hosts any value it adds up. and I do not want is.


Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about highlighting if both cells have value.

Thanks
 
Upvote 0
Thanks again Andrew, I tried this formula before I asked the question, but it did not work, I do not know what I was doing wrong.

Thanks
 
Upvote 0
I did not forget but did not put the $ sign thinking that it is not necessary, Now I know what was wrong.

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,750
Messages
6,132,500
Members
449,730
Latest member
SeanHT

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