Hello,
I have two columns column a and column b.
column a has alot of dates in it also some empty cells
What i want to do is add 30 days to those dates and publish the result on column b.
and when the cells are blank then it will be blank.
This is my code, but showing an error, type mismatch. how to solve it with a better code?
I have two columns column a and column b.
column a has alot of dates in it also some empty cells
What i want to do is add 30 days to those dates and publish the result on column b.
and when the cells are blank then it will be blank.
This is my code, but showing an error, type mismatch. how to solve it with a better code?
Code:
Sub DateExample()
Application.ScreenUpdating = False
Range("A4:A100000").Copy Destination:=Range("B4:B99999")
Dim rng As Range
For Each rng In Range("B4:B99999").Cells
rng.Value = rng.Value + 30
Next rng
Application.ScreenUpdating = True
End Sub