finding last row (that is visible) starting from the first row (that is visible)...

kbishop94

Active Member
Joined
Dec 5, 2016
Messages
476
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
never mind... I got it! apologies for the 'false alarm' ;)

how do I find the last visible row when starting from the first visible row, but BELOW a certain starting point?

So in the example below, the code would need to locate the first visible row that is below row 3, and down to the last visible row (which is row 22.)
mtw8pt.jpg


here's what I have so far:
Code:
Dim zRow As Long
    zRow = Cells.Find("*", ws.Cells(4, 1), , , xlByRows, xlPrevious).SpecialCells(xlCellTypeVisible).Row

(the above code only returns line "1" when I check it with MsgBox zRow. )
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try
Code:
Cells.Find("*", , , , xlByRows, xlPrevious).Row
 
Upvote 0
Thank you, Fluff. You must of replied right before I edited my post.. . Thank you again :beerchug:
 
Upvote 0
You're welcome & glad to see you figured it out yourelf.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top