I'm having some problems with a formula for a cell. I would like to do something like this, but I recieve a 1004 error and I know it is linked to the "Range" and "Cell" comnands located within the FormulaR1C1. I'm looking for a workaround that will allow me to place the formula into the cell. I would normally just calulate the average of the range, but the formula must be presented due to customer requirements. Help is greatly apreciated.
HORZPTrowcount = Variable as a number
I have also tried this, but I get a Code 13 error "Type Missmatch"
HORZPTrowcount = Variable as a number
Code:
Range(Cells(HORZPTrowcount, 6)).FormulaR1C1 = "=average(range(cells(3,6),cells(" & HORZPTrowcount & ",6))"
I have also tried this, but I get a Code 13 error "Type Missmatch"
Code:
Range(Cells(HORZPTrowcount, 6)).FormulaR1C1 = "=average" & Range(Cells(3, 6), Cells(HORZPTrowcount, 6)) & ")"