markdenovan
Board Regular
- Joined
- Dec 15, 2002
- Messages
- 97
Hi All,
I have a little problem which I hope someone can help me with.
I use the following formula to work out how long a list is (it's never the same number of rows):
ActiveSheet.UsedRange.Select
irows = Selection.Rows.Count
I then put in a couple of formulas in the columns next to it which works fine.
I then try to autofill using the following code:
Range("C3:E3").Select
Selection.AutoFill Destination:=Range("C3:E(irows)"), Type:=xlFillDefault
Range("C3:E(irows)").Select
I obviously have the wrong syntax, as the macro stops. If I replace the (irows) with the actual row number it works fine.
Can someone please put me straight?
Many thanks,
Mark
I have a little problem which I hope someone can help me with.
I use the following formula to work out how long a list is (it's never the same number of rows):
ActiveSheet.UsedRange.Select
irows = Selection.Rows.Count
I then put in a couple of formulas in the columns next to it which works fine.
I then try to autofill using the following code:
Range("C3:E3").Select
Selection.AutoFill Destination:=Range("C3:E(irows)"), Type:=xlFillDefault
Range("C3:E(irows)").Select
I obviously have the wrong syntax, as the macro stops. If I replace the (irows) with the actual row number it works fine.
Can someone please put me straight?
Many thanks,
Mark