Print to last column & row that has data

ShawnSPS

Board Regular
Joined
Mar 15, 2023
Messages
60
Office Version
  1. 2003 or older
Platform
  1. Windows
Header-Titles



A1 – Month

B1- Date

C1- Notes

D1- company





What I am attempting to do is only print A1 which is just the current month no other data is in that column. Then print any data from B-D. this sheet will be updated on the daily which means it will need to find the last column and row that has data in it. and I must be able to print it on one sheet . It may need to print in landscape. Because NOTES is a wider column to enter notes into it. what I have current is the following but what when it printer out it prints on three separate pages .. I don’t know why that is. can you please help out. .. Thank you





Sub prt()
Dim LR As Long
With ActiveSheet
LR = .Range("D" & Rows.Count).End(xlUp).Row
.PageSetup.PrintArea = "A1:D" & LR
.PrintOut
End With
End Sub
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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