V
VRandy
I have a table with 52 columns (date of week in a year)
with mm-dd-yy as column heads (C2:BB2)
C2 has the start date of the last week in December
BB2 has the date Jan 1)
The rows contain integers. and may be empty.
For each row I want the earliest date that has a value > 0 and that
date should be shown in column B for each row.
for example:
B2 C2 D2 E2 F2 BB2
Row2 12-28-73 12-21-73 12-14-73 12-7-73 ...1-1-73
Row3 44 15 ...
Row4 5 12 8 ... 9
Row5 4 7
Results should return:
Row B3 = 12-7-73
Row B4 = 1-1-73
Row B5 = 12-21-73
I need to search from BB2 backwards to C2 for the first cell that has
a value > ""
If I only had 7 weeks then a nested IF would work:
=If(LEN(BB3)>0,BB2,=IF(LEN(BA3)>0,BA2,=IF(LEN(AZ3)>0,AZ2,...))))
But I would need 52 nested IF's for this.
I know I could use VB to get the result using:
Active Cell.End.xlLeft
but is there a way to do it without resorting to VB?
Thanks for any help.
VRandy
with mm-dd-yy as column heads (C2:BB2)
C2 has the start date of the last week in December
BB2 has the date Jan 1)
The rows contain integers. and may be empty.
For each row I want the earliest date that has a value > 0 and that
date should be shown in column B for each row.
for example:
B2 C2 D2 E2 F2 BB2
Row2 12-28-73 12-21-73 12-14-73 12-7-73 ...1-1-73
Row3 44 15 ...
Row4 5 12 8 ... 9
Row5 4 7
Results should return:
Row B3 = 12-7-73
Row B4 = 1-1-73
Row B5 = 12-21-73
I need to search from BB2 backwards to C2 for the first cell that has
a value > ""
If I only had 7 weeks then a nested IF would work:
=If(LEN(BB3)>0,BB2,=IF(LEN(BA3)>0,BA2,=IF(LEN(AZ3)>0,AZ2,...))))
But I would need 52 nested IF's for this.
I know I could use VB to get the result using:
Active Cell.End.xlLeft
but is there a way to do it without resorting to VB?
Thanks for any help.
VRandy