Hello,
I am struggling to find a solid method to find the populated cells in a row.
In the capacity planning below I have a table of seat numbers and dates as headers. I want to find the daterange in every row. When there is only one daterange without blank cells in between I can do this with the following code:
When there are blank cells in between this does not work. As an example for OHD/TIV/EIN, I would like to get two daterange instead of one:
1) 15-Apr to 22-Apr
2) 6-Mei To 13-Mei
Can somebody point me in the right direction?
Regards,
Bas
I am struggling to find a solid method to find the populated cells in a row.
In the capacity planning below I have a table of seat numbers and dates as headers. I want to find the daterange in every row. When there is only one daterange without blank cells in between I can do this with the following code:
Code:
fCol = Cells(ActiveCell.Row, 5).End(xlToRight).Column
lCol = Cells(ActiveCell.Row, 58).End(xlToLeft).Column
If Cells(4, lCol).Value = "Total" Then
EffDate = "Check"
Else
EffDate = Cells(4, fCol)
End If
DiscDate = Cells(4, lCol)
When there are blank cells in between this does not work. As an example for OHD/TIV/EIN, I would like to get two daterange instead of one:
1) 15-Apr to 22-Apr
2) 6-Mei To 13-Mei
Can somebody point me in the right direction?
Regards,
Bas