fredlo2010
08-02-2012, 09:36 AM
Hi guys,
I am trying to populating values in cells using an array but I can't do it.
What's wrong with my code?
Dim lRow As Long
lRow = Sheets("Checkup").Cells(Rows.Count, 1).End(xlUp).Row
Range("D2:D" & lRow).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-3],Reference,5,FALSE),0)"
Range("E2:E" & lRow).Value = 0.8 / 28
Range("F2:F" & lRow).FormulaR1C1 = "=RC[-3]*RC[-2]*RC[-1]"
'ADD THE TOTALS
With Range("E" & lRow).Offset(2, 0).Resize(3, 1)
.Value = Array("Total Sq. Ft.:", "Monthly Price:", "Total Amount:")
.Font.Bold = True
.HorizontalAlignment = xlRight
End With
I am trying to populating values in cells using an array but I can't do it.
What's wrong with my code?
Dim lRow As Long
lRow = Sheets("Checkup").Cells(Rows.Count, 1).End(xlUp).Row
Range("D2:D" & lRow).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-3],Reference,5,FALSE),0)"
Range("E2:E" & lRow).Value = 0.8 / 28
Range("F2:F" & lRow).FormulaR1C1 = "=RC[-3]*RC[-2]*RC[-1]"
'ADD THE TOTALS
With Range("E" & lRow).Offset(2, 0).Resize(3, 1)
.Value = Array("Total Sq. Ft.:", "Monthly Price:", "Total Amount:")
.Font.Bold = True
.HorizontalAlignment = xlRight
End With