Home Use Cell Attribute in R1C1 Notation
 I'm running a macro where I define lastcolumnbc using the column attribute lastcolumnbc = ws.Cells.SpecialCells(xlCellTypeLastCell).Column  Later, I would like to use that attribute in R1C1 to insert a formula into a range: Set rgbe = .Range(.Cells(1, 2), .Cells(lastrow - 1, 2)) rgbe.Select Selection.FormulaR1C1 = "=INDEX(RC[1]:RC[lastcolumnbc],MATCH(TRUE,INDEX((RC[1]:RC[lastcolumnbc]<>0),0),0))" Selection.Columns.AutoFit  Unfortunately this returns an object-defined error.