Carly
Active Member
- Joined
- Aug 21, 2002
- Messages
- 370
We are trying to use a CountA formula on a spreadsheet where the amount of Columns change each time the report is run. We have had this before where we wanted the formula to be at the end of each column and used the following formula:
With [A65536].End(xlUp).Offset(1).Resize(, [IV1].End(xlToLeft).Column)
.Formula = "SUM(R2C:R[-1]C)!
.Value = .Value
End With
This then created a Sum formula against each column.
but this time we would like the formula to be at the end of each row (no. of rows will change also), so we revamped the formula to the following:
With [IV1].End(xlToLeft).Offset(1, 1).Resize(, [A65536].End(xlUp).Column)
.Formula = "=COUNTA(RC6:RC[-1])"
.Value = .Value
End With
This puts the formula in the cell where we want it to start but it doesn't go all the way down.
Is there anyway that this can be done?
Please help
Carly
With [A65536].End(xlUp).Offset(1).Resize(, [IV1].End(xlToLeft).Column)
.Formula = "SUM(R2C:R[-1]C)!
.Value = .Value
End With
This then created a Sum formula against each column.
but this time we would like the formula to be at the end of each row (no. of rows will change also), so we revamped the formula to the following:
With [IV1].End(xlToLeft).Offset(1, 1).Resize(, [A65536].End(xlUp).Column)
.Formula = "=COUNTA(RC6:RC[-1])"
.Value = .Value
End With
This puts the formula in the cell where we want it to start but it doesn't go all the way down.
Is there anyway that this can be done?
Please help
Carly