+ Reply to Thread
Results 1 to 11 of 11

getting last row of the filtered data

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    getting last row of the filtered data

    I have this large file with yes and no in col A.

    Run the macro below:

    Please Login or Register  to view this content.
    The last row reported is 224 when what i want is really 35. # of yes is 34 + col header.

    any ideas?
    Attached Files Attached Files
    Last edited by welchs101; 05-27-2011 at 06:31 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: getting last row of the filtered data

    hi, welchs101, hope this helps:
    Please Login or Register  to view this content.
    PS. Provided we are counting values in filtered range

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: getting last row of the filtered data

    Thanks watersev. Your soln worked great. I also found another soln i am posting both. Took me a few hours to find the other soln on the net. Wish i had not wasted my time and just waited for your great soln.

    Note: There are essentially two solns. and they are both at the end of the subroutine. THose marked as "row=34" are the correct soln.

    Thanks again watersev!

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: getting last row of the filtered data

    if you are happy with the offered solution please mark the thread as solved (see Forum Rules on "How to" questions)

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: getting last row of the filtered data

    fyi: i tried the new code (both possible solns) on some different code and ......well it did not work. So just be careful. I dont know why its not working yet but just double check you answers.

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: getting last row of the filtered data

    solutions are tailored to the specified parameters, if they are changed it might not work correctly. Please attach a sample workbook, I will look at it

  7. #7
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: getting last row of the filtered data

    ok....it does work.......sorry for going back and forth. whats not working is my copy and paste of the data for some reason but the row count syntax does seem to work fine.

  8. #8
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: getting last row of the filtered data

    ok, pls ignore my PM to you if there are no outstanding issues.

  9. #9
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: getting last row of the filtered data

    ok....just wanted to reaffirm.......the syntax does work.........my issue is now with copying filtered data. i was originally comparing the copy/pasted data with how much "should" be there and was finding that not all my data was transferred over. I thought i was due to the last row not being correct ..........the last row (using the new method discussed here for filtered data) is just fine........ the issue now is copying filtered data.......but i will save this for another thread.

    thanks again.

  10. #10
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: getting last row of the filtered data

    well, in my judgement it is connected to the current thread, so if you do not mind, I will suggest to use this:
    Please Login or Register  to view this content.
    PS. Header can be copied separately:
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: getting last row of the filtered data

    hi watersev,

    i started another thread for this before i read your comment.

    I had a quesiton: What dose the "offset(1)" do?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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