+ Reply to Thread
Results 1 to 6 of 6

FinalRow command

  1. #1
    Registered User
    Join Date
    09-13-2006
    Posts
    21

    FinalRow command

    I am using this code:

    Please Login or Register  to view this content.
    to find the final row.
    Now I want to hide rows 7 through the final row.
    I tried this:

    Please Login or Register  to view this content.
    Those commands work if I specify any number instead of FinalRow, but I don't know how many lines there will be. Any help?

    Thanks for the note. Someone said that before, but I didn't understand what they meant.

    Thanks!

    I also tried
    Please Login or Register  to view this content.
    That didn't work either.
    Last edited by up4asmile; 01-29-2015 at 12:51 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,914

    Re: FinalRow command

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: FinalRow command

    Try
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: FinalRow command

    Hi up4smile,

    I like to use code like this:
    Please Login or Register  to view this content.
    Isn't the number of rows that are hidden equal to "LastRow - 7" ??
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    09-13-2006
    Posts
    21

    Re: FinalRow command

    Thank you, guys. Olly, your suggestion didn't work. But Marvin, yours did. Thanks, guys!!!

    You will probably see me on again when I hit the next thing that I need help on.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: FinalRow command

    Intrigued that you say my code didn't work... Can you expand on that, please?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 05-07-2014, 07:05 AM
  2. Master Command Button to call on other Command Buttons located in other Workbooks
    By MrNickRegan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2013, 07:57 PM
  3. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 PM
  4. Can you use "Finalrow" in a formual in VBA?
    By iwilli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2012, 12:23 PM
  5. Can't declare FinalRow
    By JapanDave in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2011, 02:02 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1