Hi,
Been trying to work out a selection macro.
The range to be selected is within a Pivot table and will be run monthly, so the range will grow in time.
The below works but it needs to extend one column further to the right.
The table is set up as follows:
A5 is Row Labels and B5 to the right is Months with Grand Total sitting in J4 (next month it'll be K4, the next L4 etc)
Any ideas, i've tried various offset and resizes but without any success. Imagine its something fairly easy that just needs adding to the end.
Thanks in advance
Ben
Been trying to work out a selection macro.
The range to be selected is within a Pivot table and will be run monthly, so the range will grow in time.
The below works but it needs to extend one column further to the right.
The table is set up as follows:
A5 is Row Labels and B5 to the right is Months with Grand Total sitting in J4 (next month it'll be K4, the next L4 etc)
Any ideas, i've tried various offset and resizes but without any success. Imagine its something fairly easy that just needs adding to the end.
Thanks in advance
Ben
Code:
Sub Sealect()
Set rngData = Range(Range("A5"), Range("A5").End(xlToRight).End(xlDown))
rngData.Select
End Sub