Hi all,
Could really use a help with this.
I have use a shared spreadsheet that I have to do some simple calculatios, searches, sumifs, etc.
The example code is working fine to find the last row and column... and start the calculation but just cant
get the autofill to work.
What Im trying is to have this working without having to bother to manually have to find and declare the last
used column today can be Z, tommorow BC or AD...
thanks
Could really use a help with this.
I have use a shared spreadsheet that I have to do some simple calculatios, searches, sumifs, etc.
The example code is working fine to find the last row and column... and start the calculation but just cant
get the autofill to work.
What Im trying is to have this working without having to bother to manually have to find and declare the last
used column today can be Z, tommorow BC or AD...
thanks
Rich (BB code):
Sub test()
Dim lastrow As Long, lastcolumn As Long
Set sht = Worksheets("Base214")
Set StartCell = Range("A1")
lastrow = Range("A" & Rows.Count).End(xlUp).Row
lastcolumn = Cells(1, Columns.Count).End(xlToLeft).Column
Range("A1").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Class"
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = _
"=IF(COUNTIF(Supoort!R2C1:R22C1,Base214!RC12)>=1,""NONSTANDARD"",""STANDARD"")"
Range("lastcolumn").AutoFill Destination:=Range(lastcolumn & lastrow)
Last edited by a moderator: