skarnik01
Member
Hi,
In a macro, I am trying to identify last cell in the sheet and then auto-populating corresponding 25-30 adjacent cells based on certain calculations.
Macro used is -
LastRow2 = Range("A2").End(xlDown).Row
Range("B601:AB601").AutoFill Destination:=Range(Range("B601"), Range("AB" & LastRow2))
There are 4 dynamic charts which get auto-updated based on the values that get filled in these cells.
The problem is that the macro identifies the last cell as a cell with formula [Formula in the cell is ---- IF('Data Calculations'!B661>0,'Data Calculations'!B661,"")]. I expect a cell with a value to be identified instead of formula cell. As a result, the adjacent cells get auto-filled with #VALUE! error.
In turn the corresponding Charts drop down to zero once the macro runs against the formula cells without values.
Request you to help me know how I can identify through a macro the last cell in the column but with a value (ignoring the formulae present in that cell).
In a macro, I am trying to identify last cell in the sheet and then auto-populating corresponding 25-30 adjacent cells based on certain calculations.
Macro used is -
LastRow2 = Range("A2").End(xlDown).Row
Range("B601:AB601").AutoFill Destination:=Range(Range("B601"), Range("AB" & LastRow2))
There are 4 dynamic charts which get auto-updated based on the values that get filled in these cells.
The problem is that the macro identifies the last cell as a cell with formula [Formula in the cell is ---- IF('Data Calculations'!B661>0,'Data Calculations'!B661,"")]. I expect a cell with a value to be identified instead of formula cell. As a result, the adjacent cells get auto-filled with #VALUE! error.
In turn the corresponding Charts drop down to zero once the macro runs against the formula cells without values.
Request you to help me know how I can identify through a macro the last cell in the column but with a value (ignoring the formulae present in that cell).