Results 1 to 12 of 12

VBA to copy details from excel and save as PDF

Threaded View

arun.sj VBA to copy details from... 08-19-2020, 06:05 AM
Sintek Re: VBA to copy details from... 08-19-2020, 07:14 AM
arun.sj Re: VBA to copy details from... 08-19-2020, 07:44 AM
Sintek Re: VBA to copy details from... 08-19-2020, 07:50 AM
arun.sj Re: VBA to copy details from... 08-19-2020, 08:10 AM
Sintek Re: VBA to copy details from... 08-19-2020, 08:17 AM
arun.sj Re: VBA to copy details from... 08-19-2020, 08:36 AM
Sintek Re: VBA to copy details from... 08-19-2020, 08:48 AM
arun.sj Re: VBA to copy details from... 08-20-2020, 05:04 AM
Sintek Re: VBA to copy details from... 08-20-2020, 06:29 AM
arun.sj Re: VBA to copy details from... 08-21-2020, 02:02 AM
Sintek Re: VBA to copy details from... 08-21-2020, 03:33 AM
  1. #1
    Forum Contributor
    Join Date
    06-05-2014
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    155

    VBA to copy details from excel and save as PDF

    Dear Team,
    Need your help please.

    I have a file with associates and their respective project details. Column E has the project ID details.

    The manual activity that I does is, I filter a project ID and then copy all the details related to that project to a new excel file and then save it as PDF file in a desktop folder. Repeat the same for next project ID. So if there are 10 Project IDs in the file, I create 10 PDF Files.

    Need help with a macro code to automate this. Sample file attached.



    There is another similar activity that I does for which I already have the code. However in this activity after filtering the project ID in a column, the details are saved as an Excel file and not PDF.

    Below is the code for that for reference.

    Sub AAA()
        Dim e
        Application.ScreenUpdating = False
        With Sheets("AAA").Cells(1).CurrentRegion
            .Parent.AutoFilterMode = False
            For Each e In Filter(.Parent.[transpose(if(countif(offset(e2:e10000,,,row(1:10000)),e2:e1000)=1,e2:e1000,char(2)))], Chr(2), 0)
                .AutoFilter 5, e
                .Copy Sheets("sheet2").Cells(1)
                Sheets("sheet2").Copy
                Worksheets("Sheet2").Columns("A:BX").AutoFit
                Worksheets("Sheet2").Rows("1:10000").AutoFit
                
                ActiveWorkbook.SaveAs "C:\Users\\Downloads\ Course" & "\" & "" & e & ".xlsx"
                ActiveWorkbook.Close
                .AutoFilter: Sheets("sheet2").Cells.Clear
            Next
        End With
        Application.ScreenUpdating = False
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 02-22-2018, 03:55 AM
  2. [SOLVED] Email Details to Excel & Save as .MSG on one macro - combination of 2 macros
    By nathandavies9 in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 03-21-2017, 12:17 PM
  3. [SOLVED] Excel formula needed to find string and then copy details from another cell
    By jopat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-09-2014, 10:10 PM
  4. [SOLVED] how can i search and copy details of a particular User details in Sheet1
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2014, 02:58 AM
  5. Save Email Details in excel file
    By s_samira_21 in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2014, 04:12 AM
  6. Replies: 0
    Last Post: 08-21-2012, 01:19 AM
  7. Can I get excel to auto save details from a cell into the doc nam.
    By excelnewbie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2005, 03:05 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