![]() |
make autofill code conditional to avoid runtime error.
In this portion of my code, I get an runtime error IF e2 is blank. I
need this to be conditional. Therefore, if e2 is blank, avoid the autofill and keep going to next step in code... Do not give me the runtime error. With ThisWorkbook.Worksheets("2mindex") Set rngData = .Range("e2:e" & .Cells(.Rows.Count, "e").End (xlUp).Row) Set rngFormula = .Range("f2") rngFormula.AutoFill _ Destination:=.Range(rngFormula, _ .Cells(rngData.Rows(rngData.Rows.Count).Row, rngFormula.Column)) End With |
All times are GMT +1. The time now is 05:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com