Printing Selected Columns from Multiple Sheets
Closed
Redza Kalam
-
Jan 1, 2016 at 12:24 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jan 1, 2016 at 03:18 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jan 1, 2016 at 03:18 AM
Related:
- How to print selected columns in excel
- How to clear formatting in excel - Guide
- Excel mod apk for pc - Download - Spreadsheets
- How to change date format in excel - Guide
- Number to words in excel - Guide
- How to take screenshot of selected area in excel - Guide
1 response
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Jan 1, 2016 at 03:18 AM
Jan 1, 2016 at 03:18 AM
Hello Redza Kalam,
Perhaps the following code may be what you are wanting:-
The code hides the columns that you don't want to print, prints the columns that you do want to print and then unhides all the hidden columns.
I'm not sure of the extent of your dataset, but following is a link to my test work book which will give you an idea of how it works. Click on the Print button to see it work.
https://www.dropbox.com/s/i1vepf20o0g9r3f/RedzaKalam%28Print%20selected%20columns%20in%20multiple%20sheets%29.xlsm?dl=0
I hope that this helps.
Cheerio,
vcoolio.
Perhaps the following code may be what you are wanting:-
Sub PrintIt()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In Worksheets
ws.Columns("B:K").EntireColumn.Hidden = True
ws.Columns("M:N").EntireColumn.Hidden = True
ws.PrintOut
ws.Columns("B:K").EntireColumn.Hidden = False
ws.Columns("M:N").EntireColumn.Hidden = False
Next ws
Application.ScreenUpdating = True
End Sub
The code hides the columns that you don't want to print, prints the columns that you do want to print and then unhides all the hidden columns.
I'm not sure of the extent of your dataset, but following is a link to my test work book which will give you an idea of how it works. Click on the Print button to see it work.
https://www.dropbox.com/s/i1vepf20o0g9r3f/RedzaKalam%28Print%20selected%20columns%20in%20multiple%20sheets%29.xlsm?dl=0
I hope that this helps.
Cheerio,
vcoolio.