ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to find empty cell and select range to print selected. (https://www.excelbanter.com/excel-programming/361461-macro-find-empty-cell-select-range-print-selected.html)

[email protected]

Macro to find empty cell and select range to print selected.
 
I am having problems developing a macro to find the first empty cell in
the column range w14:w121.

Upon finding the first empty cell in the W column range it should off
set to column Z and do a ctrl-shift-home to select the last selected
cell up to cell A1 and print selection.

I have looked through google but cannot make sense of using ifempty or
using some other method to determine the first empty cell.


Bob Phillips[_14_]

Macro to find empty cell and select range to print selected.
 
Dim rng As Range
Set rng = Range("A1").Resize(Range("W14").End(xlDown).Row, 26)
ActiveSheet.PageSetup.PrintArea = rng.Address


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

wrote in message
oups.com...
I am having problems developing a macro to find the first empty cell in
the column range w14:w121.

Upon finding the first empty cell in the W column range it should off
set to column Z and do a ctrl-shift-home to select the last selected
cell up to cell A1 and print selection.

I have looked through google but cannot make sense of using ifempty or
using some other method to determine the first empty cell.





All times are GMT +1. The time now is 04:34 PM.

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