JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
I can't seem to get the syntax correct on this one.
I have a table of some 20,000 rows and growing daily.
When I add data from another spot, it fills columns A to G, no problem. Then I have to copy the formulas in columns H to J to the last row in the appended data set.
I can select the last row of data in columns H to J easy enough with
Range("R3").End(xlDown).Select
Range(ActiveCell, ActiveCell.Offset(0, 2)).Select
But then I can't get the Autofill to work with this line
Selection.AutoFill Destination:=ActiveCell.Range(ActiveCell, ActiveCell.Offset(0, 2).End(xlDown)), Type:=xlFillDefault
Can somebody please tell the correct synatx for the autofill line.
Thanks
I can't seem to get the syntax correct on this one.
I have a table of some 20,000 rows and growing daily.
When I add data from another spot, it fills columns A to G, no problem. Then I have to copy the formulas in columns H to J to the last row in the appended data set.
I can select the last row of data in columns H to J easy enough with
Range("R3").End(xlDown).Select
Range(ActiveCell, ActiveCell.Offset(0, 2)).Select
But then I can't get the Autofill to work with this line
Selection.AutoFill Destination:=ActiveCell.Range(ActiveCell, ActiveCell.Offset(0, 2).End(xlDown)), Type:=xlFillDefault
Can somebody please tell the correct synatx for the autofill line.
Thanks
Book1 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
1 | Horse Name | Date | Course | Distance | Condition | Class | Time | Day | State | Track Location | Race N# | ||
2 | Rikibobby | 44352 | Adelaide River | 1200 | Good | BM54 | 01:08.15 | 05/06/2021 | NT | Country | |||
3 | Kronos | 44352 | Adelaide River | 1200 | Good | BM72 | 01:07.62 | 05/06/2021 | NT | Country | |||
4 | Huckleberry | 44352 | Adelaide River | 1200 | Good | Mdn | 01:08.41 | 05/06/2021 | NT | Country | |||
5 | Highly Decorated | 44352 | Adelaide River | 1600 | Good | Open | 01:36.82 | 05/06/2021 | NT | Country | |||
6 | Highly Decorated | 44322 | Adelaide River | 1600 | Good | Open | 01:36.82 | 06/05/2021 | NT | Country | |||
7 | Familja | 44352 | Adelaide River | 1000 | Good | RST58 | 00:57.76 | 05/06/2021 | NT | Country | |||
8 | Floreat Pica | 44352 | Adelaide River | 1600 | Good | RST64 | 01:37.11 | ||||||
9 | Rikibobby | 44352 | Adelaide River | 1200 | Good | BM54 | 01:08.15 | ||||||
10 | Kronos | 44352 | Adelaide River | 1200 | Good | BM72 | 01:07.62 | ||||||
11 | Floreat Pica | 44352 | Adelaide River | 1600 | Good | RST64 | 01:37.11 | ||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H7 | H2 | =IF(B2="","",B2) |
I2:I7 | I2 | =VLOOKUP(C2,'New Ponies.xlsm'!RaceCourse[#Data],2,FALSE) |
J2:J7 | J2 | =VLOOKUP(C2,'New Ponies.xlsm'!RaceCourse[#Data],3,FALSE) |