Results 1 to 8 of 8

Thread: Hide rows after last entry macro
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Feb 2019
    Posts
    138
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Hide rows after last entry macro

    Hi Everyone,

    We import approximately 400 rows of data into a spreadsheet. I would like to hide all rows after the last entry with a macro.
    The caveat is that the last populated row is not the same each day so today might be 374 and tomorrow might be 402.

    Any help would be appreciated!

    Thanks

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Hide rows after last entry macro

    How about
    Code:
    Sub Buns1976()
       Range(Range("A" & Rows.Count).End(xlUp).Offset(1).Row & ":" & Rows.Count).EntireRow.Hidden = True
    End Sub
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    Feb 2019
    Posts
    138
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hide rows after last entry macro

    Hi Fluff,

    That hides all the rows in the sheet! We just want to hide rows after the last entry please.

    Thanks

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Hide rows after last entry macro

    Which column will always have a value on the last row?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  5. #5
    Board Regular
    Join Date
    Feb 2019
    Posts
    138
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hide rows after last entry macro

    Hi Fluff,

    My bad. I missed "A". Changed to "B" and all is good. Sorry!
    Quick question off topic a bit. I'm running a macro that inserts
    today's Date in B2. In the formula bar I see 4/4/2019 but cell B2
    is blank?

    Thanks a bunch!

  6. #6
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Hide rows after last entry macro

    You're welcome & thanks for the feedback

    Sounds like you either have conditional formatting on that cell, or a custom number format.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  7. #7
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Hide rows after last entry macro

    Another possibility is the font is the same as the fill colour.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  8. #8
    Board Regular
    Join Date
    Feb 2019
    Posts
    138
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hide rows after last entry macro

    Hi Fluff,

    or white text on a white background.....I'm losing my mind!!

    Thanks again!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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