I have data that looks like that:
<colgroup><col span="2"></colgroup><tbody>
</tbody>I want to fill the missing data in column b. that will be paralel to column a.
I wrote the attached macro
Range("B1").Select
Selection.End(xlDown).Select
Range("B7").Select
ActiveCell.FormulaR1C1 = "0"
Range("B8").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
Range("B8").Select
Selection.AutoFill Destination:=Range("B8:B16")
Range("B8:B16").Select
End Sub
my problem is that this macro does not work properly if column b is shorter or longer. How can i correct the macro that regardless the column length it will fill he missing data.
Thanks
a | 1 |
b | 5 |
c | 3 |
d | 7 |
e | 2 |
f | 2 |
g | |
h | |
i | |
j |
<colgroup><col span="2"></colgroup><tbody>
</tbody>
I wrote the attached macro
Range("B1").Select
Selection.End(xlDown).Select
Range("B7").Select
ActiveCell.FormulaR1C1 = "0"
Range("B8").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
Range("B8").Select
Selection.AutoFill Destination:=Range("B8:B16")
Range("B8:B16").Select
End Sub
my problem is that this macro does not work properly if column b is shorter or longer. How can i correct the macro that regardless the column length it will fill he missing data.
Thanks