Formula
Closed
Jenna3009
Posts
1
Registration date
Thursday 6 June 2013
Status
Member
Last seen
6 June 2013
-
6 Jun 2013 à 04:22
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 6 Jun 2013 à 10:36
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 6 Jun 2013 à 10:36
Related:
- Formula
- Logitech formula vibration feedback wheel driver - Download - Drivers
- Spreadsheet formula - Guide
- Grade formula in excel marksheet - Guide
- Credit summation formula - Guide
- Formula to calculate vat in excel - Guide
2 responses
Do you need a Macro, or a Formula?
Is each day totaled on its own by workers? So Wednesday would have "5"?
YOu may need to make a hidden column beside the day. Check in the hidden cell what the fromatting is of the cell next to it {if/then statement structure =if(logical condition,true, false)}. If the formatting fits the day has been occpied, then make the hidden cell a 1. At the bottom of that hidden column run the formula =Sum(Z10:Z30) (use whatever column calculations, this exampe uses Column Z as the hidden column to total ).
I hope this helps.
Is each day totaled on its own by workers? So Wednesday would have "5"?
YOu may need to make a hidden column beside the day. Check in the hidden cell what the fromatting is of the cell next to it {if/then statement structure =if(logical condition,true, false)}. If the formatting fits the day has been occpied, then make the hidden cell a 1. At the bottom of that hidden column run the formula =Sum(Z10:Z30) (use whatever column calculations, this exampe uses Column Z as the hidden column to total ).
I hope this helps.
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
6 Jun 2013 à 10:36
6 Jun 2013 à 10:36
Hi Jenna,
We need a custom formula for that since you can't retrieve color index using the standard formula's.
Put this public function in a module:
Then use the formula as in:
=CountWhiteCells(A1:B10) or whatever range.
Best regards,
Trowa
We need a custom formula for that since you can't retrieve color index using the standard formula's.
Put this public function in a module:
Public Function CountWhiteCells(TargetCells As Range) As Variant
CountWhiteCells = 0
For Each cell In TargetCells
If cell.Interior.colorIndex = xlNone Then
CountWhiteCells = CountWhiteCells + 1
End If
Next cell
End Function
Then use the formula as in:
=CountWhiteCells(A1:B10) or whatever range.
Best regards,
Trowa