ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to select range based on cell not being blank (https://www.excelbanter.com/excel-programming/335088-macro-select-range-based-cell-not-being-blank.html)

neb[_5_]

Macro to select range based on cell not being blank
 

I am working on the attached worksheet. Some pay periods, there may be
300 employees being paid, and others there may be 100. What I need to
be able to do is to Select the range A6 through X6 for as many rows as
have data based in in Column R6:R1000. Most of the cells in the range
A6 to X1000 have formulas in them. I figured I would use column R as a
basis for determinining the last row that has values because there is
no formula in that columm. Once the range that has information
inserted in it is selected, I need to sort it in Ascending order based
on the name in column B6 to B whatever the last cell with data
entered.

I can record a macro, but my problem is that the data is not static.
Ergo, I am asking for the macro to select the last cell in column R
that has data in it.

I hope this is understandable.

Thanks for any help offered.


--
neb
------------------------------------------------------------------------
neb's Profile: http://www.excelforum.com/member.php...o&userid=17597
View this thread: http://www.excelforum.com/showthread...hreadid=388755



All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com