+ Reply to Thread
Results 1 to 11 of 11

Saving specific columns in a sheet as a PDF file

  1. #1
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Saving specific columns in a sheet as a PDF file

    The following code save entire sheet as PDF file and is working fine. But i want specific columns to be saved as a PDF which are given below:

    Columns to save only: A, B, D, E, O, P, W, X, AD, AE, AJ, AK, AP, AQ, AS, AT.

    How to do this, please help
    Please Login or Register  to view this content.
    I have posted this here too:https://www.facebook.com/engr.zahidh...location=group

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Saving specific columns in a sheet as a PDF file

    Something like below should do it.
    Please Login or Register  to view this content.
    NOTE: You should probably set print area before you export.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Saving specific columns in a sheet as a PDF file

    @CK76 I have some merged Cells in the sheet due to which the following error arose.
    Attached Images Attached Images

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Saving specific columns in a sheet as a PDF file

    Without sample workbook can't help you much.

    In general, avoid merged cells at all cost. It's just visual fluff and causes more issue than what it's worth.

  5. #5
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Saving specific columns in a sheet as a PDF file

    Here is the sample file please
    and i want only these columns to be saved in pdf
    A, B, D, E, O, P, W, X, AD, AE, AJ, AK, AP, AQ, AS, AT.
    Attached Files Attached Files

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Saving specific columns in a sheet as a PDF file

    Do you want to copy entire column? Or just the data range starting from Row 12?

    If you need range above row 12... you'll need separate process to copy that range separately.

  7. #7
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Saving specific columns in a sheet as a PDF file

    Yes entire columns till end of data

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Saving specific columns in a sheet as a PDF file

    Then please replicate what end result before export should look like (in another sheet) and upload.

    I'll try to match what your end result looks like via code.

  9. #9
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Saving specific columns in a sheet as a PDF file

    Please check the attached file...i need only these columns
    Attached Files Attached Files

  10. #10
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Saving specific columns in a sheet as a PDF file

    Here, try this then.
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Saving specific columns in a sheet as a PDF file

    This works great...Thank you so much CK76...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Saving a specific sheet from workbook and leaving only one specific module in it.
    By Beginner1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2019, 06:00 PM
  2. Replies: 0
    Last Post: 02-28-2019, 04:03 AM
  3. Saving of individual file from a master file based on specific criteria
    By Nioner in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2019, 07:43 PM
  4. [SOLVED] Help with VBA to automate saving file in specific location and file name with dates
    By fornight in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2017, 08:07 AM
  5. Saving a Workbook With A Specific File Name in a Specific Location
    By kyjae in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2016, 02:49 PM
  6. [SOLVED] Copy data from Specific columns from a csv file and pasting it in the Active sheet
    By Pavan Renjal in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-01-2014, 12:14 PM
  7. Saving a File with specific file name using Macro
    By LstarS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2009, 06:13 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1