Vincent Thank You
New Member
- Joined
- Oct 3, 2017
- Messages
- 18
Hello!
After filtering for 2017 data in column C the following formula:
With ActiveSheet.Range("N2:N" & Cells(Rows.Count, 2).End(xlUp).Row).SpecialCells(xlCellTypeVisible)
.Cells.FormulaR1C1 = "=IfError((RC[-2]),0)"
.Cells.FillDown
Worksheets("2016").Columns(10).Calculate
End With
runs in the macro. The problem is that sometimes their is no 2017 data and the macro gets hung up and debugs .Cells.FillDown I tried playing around with some if then codes but I can't get it to work properly. Any ideas?
After filtering for 2017 data in column C the following formula:
With ActiveSheet.Range("N2:N" & Cells(Rows.Count, 2).End(xlUp).Row).SpecialCells(xlCellTypeVisible)
.Cells.FormulaR1C1 = "=IfError((RC[-2]),0)"
.Cells.FillDown
Worksheets("2016").Columns(10).Calculate
End With
runs in the macro. The problem is that sometimes their is no 2017 data and the macro gets hung up and debugs .Cells.FillDown I tried playing around with some if then codes but I can't get it to work properly. Any ideas?