E
Enz
I am trying to find all Saturdays within a range(on row 14), and if a
Saturday is detected, then I would like to add the values in the
corresponding row for the Saturday only dates(available in row 16).
After going through the date range, and the total sum is zero, then I
would like to return false. I also am trying to avoid doing this via
a macro as it should be automatically re-calculated if a cell changes.
Currently I have the cell formatted as follows that will provide a
true or false response, if any Saturday is detected with values in the
corresponding row. I created an IsSaturday function, that seems to be
returning #value. The result is that the formula always produces the
result of false.
=IF(SUMIF($C$14:$AG$14,IsSaturday(),C16:AG16)<>0, TRUE, FALSE)
Below is the function I have coded:
Public Function IsSaturday(x As Date) As Boolean
If Weekday(x) = 7 Then
IsSaturday = True
Else
IsSaturday = False
End Function
Is there something I am missing here, or can it be done a better way?
Thanks & regards,
Enzo
Saturday is detected, then I would like to add the values in the
corresponding row for the Saturday only dates(available in row 16).
After going through the date range, and the total sum is zero, then I
would like to return false. I also am trying to avoid doing this via
a macro as it should be automatically re-calculated if a cell changes.
Currently I have the cell formatted as follows that will provide a
true or false response, if any Saturday is detected with values in the
corresponding row. I created an IsSaturday function, that seems to be
returning #value. The result is that the formula always produces the
result of false.
=IF(SUMIF($C$14:$AG$14,IsSaturday(),C16:AG16)<>0, TRUE, FALSE)
Below is the function I have coded:
Public Function IsSaturday(x As Date) As Boolean
If Weekday(x) = 7 Then
IsSaturday = True
Else
IsSaturday = False
End Function
Is there something I am missing here, or can it be done a better way?
Thanks & regards,
Enzo