Mondi_2000
New Member
- Joined
- May 4, 2017
- Messages
- 7
Hi Forum,
I am trying to select a range of rows in a spreadsheet, via a macro.
My macro button is in the London 2017 cell.
Once I click on the button I'd like the macro to select Rows 2 to 5
Rows 2-5 are empty so I'm sure the code will include Select XLDown but that selects Row 6
I would like to use the same code to be able to select Rows 7 to 8 etc etc
I've looked at so much code but I've not found anything to help me.. I'm not trained in VBA so simple is best
Thank you in advance
Raymond
[TABLE="width: 500"]
<tbody>[TR]
[TD]1 London[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]6 New York[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]9 Sydney[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am trying to select a range of rows in a spreadsheet, via a macro.
My macro button is in the London 2017 cell.
Once I click on the button I'd like the macro to select Rows 2 to 5
Rows 2-5 are empty so I'm sure the code will include Select XLDown but that selects Row 6
I would like to use the same code to be able to select Rows 7 to 8 etc etc
I've looked at so much code but I've not found anything to help me.. I'm not trained in VBA so simple is best
Thank you in advance
Raymond
[TABLE="width: 500"]
<tbody>[TR]
[TD]1 London[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]6 New York[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]9 Sydney[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]