Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Dec 2012
    Posts
    58
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Active Cell + 250 lines highlight macro issue

    Hi all,

    I've found the last active cell in my range and then offset this by 5 as this is where a pivot table will start in my data.

    I then want to highlight that data in the pivot, which can have spaces in it down, say around 250 lines to allow for an expaning pivot and then format the cells:

    Dim lRow1

    Range("E:E").Select
    Selection.End(xlDown).Select
    Selection.Offset(5, 0).Select
    lRow1 = ActiveCell.Row

    I can get to the active cell which works, but i dont then know how to highlight that cell and down 250 lines.

    Regards,

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    If you are trying to refer to the range occupied by the pivot table then you can use its TableRange2 property.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •