Row ‘ ‘ last row in named range current region ‘ j Last In Region = o Sht. Row – 1 ‘ ‘ last row in Table ‘ j Last In Table = o Sht. For name ranges they skip hidden rows but stop at the row before an empty cell.: ' ' last visible cell in Named Range using End(xl Up) ' j Last Visible Range = o Sht.
I have written a couple of cover macros in Class Progress Bar V2.01to illustrate how to use this progress bar; I also have and example that uses two progress bars simultaneously.This Progress Bar was my first project after I learned how to set up class modules: hence the name.The progress bar that I developed earlier, is one of my most visited posts, and I thought I have to reward my readers with a progress bar that is much more easier to use.So formatted cells are considered used, as well as cells containing values and formulas. Row When using End(xl Up) you want start outside the range in an empty cell, so I used Offset to get to the first row below the range. Using End(xl Down) is simpler for a Range: the code start at the first row in the range and ends at the first of the last visible row in the range that contains data and the last row before an empty cell. ' ' last row in Table using End(xl UP) - Note End(xl Up ) behaves differently for tables - includes hidden rows ' j Last In Table2 = o Sht. Cells remain flagged as used even when all formatting, values and formulas are removed. Row ' ' last visible cell in Named Range using End(xl Down) ' j Last Visible Range2 = o Sht.