MartinSpellacy
New Member
- Joined
- Jun 6, 2018
- Messages
- 4
Hi,
I have the below table which has 5 colums in it. The data in columns B to D is already populated for me however the only data in column A is found in Cell A2. I have created a macro to auto fill column A ( please see below). In my example I have 236 rows to autofil.
My problem is this.... my row range is dynamic and I may have less or more rows. How to I edit the macro so that it autofills to the potential last row?
Thanks in advnace
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheets("Ab").Select
Range("A2").Select
Selection.autofill Destination:=Range("A2:A236")
Range("A2:A236").Select
I have the below table which has 5 colums in it. The data in columns B to D is already populated for me however the only data in column A is found in Cell A2. I have created a macro to auto fill column A ( please see below). In my example I have 236 rows to autofil.
My problem is this.... my row range is dynamic and I may have less or more rows. How to I edit the macro so that it autofills to the potential last row?
Thanks in advnace
Depot | WIP | Dept | Status | Date In |
Aberdeen | 22717 | W | 1 | 28/03/2018 |
Aberdeen | 24105 | W | 1 | 27/04/2018 |
Aberdeen | 24048 | W | 1 | 05/04/2018 |
Aberdeen | 24330 | W | 1 | 05/04/2018 |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheets("Ab").Select
Range("A2").Select
Selection.autofill Destination:=Range("A2:A236")
Range("A2:A236").Select