Free Microsoft Excel 2013 Quick Reference

COPY and pasting pdf data to excel using excel vba


Can anyone please provide me a code to copyall the pages of pdf file to excel using VBA.

I tried some of the code,But it works for only one page.

I want to copy all the pages in the PDF in a single stretch and copy the same to Excel.

Can anyone please provide the code for the same in VBA.

Thanks in Advance.

Post your answer or comment

comments powered by Disqus
How can I copy and paste from word to excel, w/o being in one cell

1.User picks options from combo boxes to create a plan
2.User then runs a macro to copy finished plan.
3.Then selects the correct location within a database to paste.
4.Then runs another macro to paste data

I want to specify the paste location by using a cell reference generated by
the user entering a week number which then uses VLOOKUP to return the correct
cell within the database. My aim is to run one macro to copy and paste the
data to the correct location

I have a main workbook with a Tails sheet and an Assays sheet. The tails sheet has a list of sample IDís in column A. The Assays sheet is blank and every day I open up a different worksheet and copy and paste the data from that sheet into the Assays sheet. The copied data is a list with sample IDís in column A and then assays in columns B to AL. The data is copied in every day and the sample IDís are different every time
I need to write a macro to find if any of the copied sample IDís in the Assays sheet match the sample IDís in the Tails sheet and when they do copy and paste from corresponding data in that row (from columns B to AL) into the matching row in the Tails sheet.
I tried to use a for next loop with a match function but once it has found the matches it continues to paste the last match into the rest of the list and in my larger workbook it is very slow.
I have attached a copy of the worksheet

[FONT=Calibri][SIZE=3]Sub FindPaste()[/SIZE][/FONT] 
[FONT=Calibri][SIZE=3]Dim r As Long 
Dim LastRowTails As Long 
Dim LastRowAssays As Long 
Dim strLookup As String[/SIZE][/FONT] 
[FONT=Calibri][SIZE=3]LastRowTails = Worksheets("Tails").Cells(65536, 1).End(xlUp).Row[/SIZE][/FONT] 
[FONT=Calibri][SIZE=3]LastRowAssays = Worksheets("Assays").Cells(65536, 1).End(xlUp).Row[/SIZE][/FONT] 
[FONT=Calibri][SIZE=3]Set rngLookup = Range("A1", Cells(LastRowAssays, 1))[/SIZE][/FONT] 
[FONT=Calibri][SIZE=3] For i = 2 To LastRowTails 
On Error Resume Next 
strLookup = Worksheets("Tails").Cells(i, 1) 
r = Application.WorksheetFunction.Match(strLookup, rngLookup, 0) 
With Worksheets("Assays") 
    .Range(.Cells(r, 2), .Cells(r, 38)).Copy Worksheets("Tails").Cells(i, 2) 
End With 
Next i[/SIZE][/FONT] 
[FONT=Calibri][SIZE=3]End Sub[/SIZE][/FONT] 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

I am trying to copy and paste filtered data from one column to an adjacent
column, but Excel copies the data in the hidden cells as well as the visible
cells. Short of copying one cell at a time, Is there a way to copy an entire
column of the visible cells only?

Thank you for your help

I'm trying to copy information from internet explorer into excel. There's a
lot of info on different pages so I was wondering if this was possible?

Basically the website has a search function. I have all the searches I need
in excel right now. Right now I'm copying the search item into the search
window and then hitting enter then copying a description of the item and then
copying that into excel. Then I'm going back to the search bar and entering
another search item.

Does this make sense? Is there a way to write this as a macro? I'm
familiar with making macros but I've always stayed within excel.

Thanks for any help

How can I copy a column (C6:C200) and paste it according to a cell value . If I have in a cell 5 it will paste column (C6:C200) five times ........etc.
Thanks in advance.

ok. vba newbie...

i want to select and entire row in excel in sheet 1, and paste the entire row into sheet 2. (2 different worksheets in the same workbook)

what code do i need to do this?

I copy and paste from Access to Excel. The timestamp used to show in excel
with both date and time - but now all of a sudden just shows date. I realize
i can format the cells to show - but doing this several hundred times a day
is tedious. What changed and how can i change it back?

Hey all,

My question:

I have an array of data.. i then have an =IF operator working the array of data outputting "up" or "down" text in the column based on a formula.. its simple, but I just needed a way to put the relevant "up" or "down" labels down this long list of data. Also, this formula to label "up" or "down" takes into account past data, so its period dependent. The first 20 or so cells doesnt have a label until it has 20 periods to calculate.

Now, my conundrum. I'm done labeling this data. I now want to take the data out, and have a new workbook with the new data ommitting the first 20 cells so that there are no NA# cells. If i just copy and paste the data where labeling begins, in the new workbook, my array functions are pasted as well and again, labeling doesnt begin until the 21st cell.

Is tehre a way to freeze all calculations and make it "flat" so I can just copy and paste the data into a new workbook, pretending I never had to write a formula to label all the data?

Thanks in advance.


Good Afternoon Everyone,

I am having trouble getting a macro to work correctly, I currently have a macro that will take the date in cell R4, find the corresponding month in range D8:O8, and copy and paste the data to cell P9. I am now trying to do something similar with cell R4. I have set up two more moth heading in Q24 and R24. the dates adjust based on the data in R4.

So what I am trying to do is take the month in P24, find the corresponding month data in row 13 and paste it in Cell P31.

Any help ould be greatly appreciated.

Hi all,

I am trying to copy specific information from a web site to Excel using VBA. I have tried a couple of methods found on the internet to no avail. The type of copy proceedure that I tried was execCommand "copy". When I wrote the code ie.document.execCommand "copy". It just wants to copy the whole page. I just need on piece of the page. If a form name is needed, I think it is form1. I cant put the entire source code in here, due to this being a private site. Thanks in advance for your help.


I am able to copy and paste the worksheet to new worksheet
in new workbook. But i have one problem. The worksheet
which I am copying is having VBA Code behind it. When i do
copy paste , VBA code also copies to new workseet. I do
not want the VBA code to be copied..

Any solution...

My Existing Code

' This is for remove the formulas.
ActiveSheet.UsedRange = ActiveSheet.UsedRange.Value


Hi All,

I have two issues that i am stuck in.

I have written a VBA to read data from a text file (almost 5 MB = 2 lakh rows) and write into excel file. The script runs fine and transfers all data to the excel.But when i open the resulting excel file, only the first 2 and the last worksheets are visible. The worksheets in between and the data in it are missing.

Second issue is tht, although i have written code to create a new worksheet when row number reaches 65535, the script writes only till row no. 32768.

I have no clue why this is happening. Please help...

Thanks in advance

I have 2 columns, Column A has data and blanks in the cells.

I need a Macro that can go down the column and when it comes across data in a cell in column A it copies and pastes the data to Column B on the same row.

My 'Looping' does not seem to work Can any one help


I am dealing now with another weather data. The format I need is an hourly data for each month, but what I have is a 3-6 hours data, for example i have for the date 1/1/2005 the following hours:

I need the data to be like this:

So what should be done is copy the data for the (00.00 hour) and paste them twice so I will have (00.00, 01.00 and 02.00) and they all have the same values (the value of the 00.00 hour). After that I have a missing data for hours 03.00, 04.00 and 05.00) so I have to create a row for each hour and fill each cell in those row with (9999). So I need an if statement that can see if the difference between (00.00) and (06.00) is 6 hours it will create (01.00, 02.00) from the (00.00 hour) then it will add rows for (03.00, 04.00 and 05.00) and give each cell in each row a value of (9999), and when the difference is 3 hours it will just copy and past the data of the previous hour, and in my example the difference between (06.00 and 09.00) it will only copy the data of the (06.00 hour) and paste them after it twice so it will create (07.00 and 08.00).
Now another thing, I recorded macros to arrange the original data in the form I want, but since we have months with 30 days and others with 31 and others with 29 or 28 I couldn't add that for the macro, so is there is any way I can edit the macros to make them stop after they face an empty cell??
(Attached is an example for the data I want and a list for the macros I made so someone will help me edit them)
The excel file I attached to this post contains three sheets: "original" which contains the original data, "my macros" which contain the data after I edited them using a recorded macro, and "final" which contain the data in their final format to use in the model and I highlighted the created rows in yellow, and I only put 10 in that sheet just to be brief, but when I will apply the macro I should make the whole days. And the "if" macro I will use it to the "my macros" sheet. Also you will find a list for the macros I recorded to produce the "my macros" sheet from the "original" sheet.
And in case the data were like this:
About the "1100" hour the macro should copy the "0900" hour and paste it once so it will create "1000" with the same data as "0900" and after that "1100" should be skipped and the macro should copy "1200" and paste it twice to create "1300" and "1400" with data the same as "1200".
Please guys, I have to finish this by the end of January in order to run the wind erosion model, and I am stuck in this issue only.
Thank you all in advance

I have data in Excel in 3 columns.

Column A has Date
Column B has Time
Column C has Stock Price

I am trying to copy the stock price for a certain time interval each day for different dates and paste them to column F.

eg. I would like to copy stock prices between 10:30 am to 11:00 am for the dates 8/10/09 to 8/15/09 and paste the data to column F.

How can I create a macro to do this?

I have attached a sample data sheet herewith.

Thank you.

Hi all,

I have an Excel macro that is supposed to copy the data from a worksheet in one workbook to a different worksheet in a different workbook.

I have searched these forums (and several others) and tried out at least a dozen different bits of code I have found, and none of them seem to work. Part of the problem is that the macro needs to be in the destination workbook, not the source workbook (the source workbook, "data.xls," often gets overwritten, destroying any macros saved to it, so it is easier and more robust to have the macro in the workbook that isn't getting touched). Here is the code I have currently:

    Dim sourceSheet As Worksheet 
    Dim destSheet As Worksheet 
     '' copy from the source
    Workbooks.Open Filename:="data.xls" 
    Set sourceSheet = Worksheets("data") 
     '' paste to the destination
    Workbooks.Open Filename:="MonteCarlo.xls" 
    Set destSheet = Worksheets("raw data") 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
I can't figure out why this won't work. It doesn't give me any errors messages. When the macro is run, it opens "data.xls" and selects the appropriate range, and it also opens "MonteCarlo.xls" and selects the appropriate range, but it won't copy and paste.

Any suggestions?


I have tried using the below mentioned macro. However, it only work on one cell. I need to copy and paste a range from A1:Q200.

    Dim wbResult As Workbook, wbSource As Workbook, CopyRng As Range, Dest As Range 
    Dim FileName As String, Filt As String 
    Set wbResult = ThisWorkbook 
    Set Dest = wbResult.Sheets("Data").Range("A1:Q200") 
    Application.ScreenUpdating = False 
    Application.DisplayAlerts = False 
    Filt = "All Files (*.*),*.*" 
    FileName = Application.GetOpenFilename(Filt) 
    Set wbSource = Workbooks.Open(FileName) 
    Set CopyRng = wbSource.Sheets("Summary").Range("A1:Q200") 
    Dest = CopyRng 
    Application.ScreenUpdating = True 
    Application.DisplayAlerts = True 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


This is the first time i've posted - i've usually been able to find the information i've been seeking from all the knowledgable postings. However, this time i'm stumped.

What I am looking to do is to archive a copy of data from a main worksheet to a new worksheet, which is automamtically named using a cell reference - concatenated text and todays date. By using some code I found here to create the new sheet (see below), I then recorded a macro to copy and paste the data across to the new sheet (running the first macro in the new macro). This worked perfectly, until it came to testing it the next day. Looking at the code, the 2nd macro (the one that copies and pastes the data to the new sheet) was 'hardcoded' (excuse the dodgy terminology, but i'm fairly raw at VB stuff!) with the sheet name from the day that I recorded the macro (e.g. 'Archived on 28/01/08' rather than dynamically looking for the sheet created in the 1st macro. Any ideas how I would tackle this?

The 1st macro, which works, is:

Sub New_Archive_Sheet()

ActiveSheet.Name = Sheets("Current Week").Range("I1")

End Sub

Many Thanks in advance

I have a workbook which has data that I need to copy and paste everytime it appears in a row.
******** ******************** ************************************************************************>Microsoft Excel - Book2test for units.xls___Running: xl2002 XP : OS = (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutA1=
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box

From the data shown above what I need to do is everytime a number appears in column F thats next to BY in column E I need that number cut and pasted to the same row in column A. What I also need to do is do the same with the dates from in column D to column B. What im trying to do with this one is delete runs from before pasting.
See below as to how I need it.

******** ******************** ************************************************************************>Microsoft Excel - Book2test for units.xls___Running: xl2002 XP : OS = (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutA1=
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box

I need this to run right down the page.

Can anyone help?

I know how to copy and paste data in a Word document and also from cells
within an Excel spreadsheet. However, the ability to copy and paste header
and footer data requires a different command, which does not readily come to
mind and doesn't seem to be available in the Help section for Excel. It is
not your standard "C" and "P".

Hello all,
I am hoping since the end result is going to be in Excel, you dont mind me asking this question here. I get same data sent to me by email from different people at different time. I use copy and then paste it to excel to run a report. my question is, is there any way of automating that by means of macro or VB codes where I can run it while I have the email in read mode and I just press a button or something which will copy and paste to excel and run the macro that I already have (to print report). Any assistance would be appreciated.

I download a spreadsheet everyday titled "All Records". I need to copy and
paste specific data into an existing macro from the "All Records" tab to
other tabs in the workbook. (by the way, this is my first attempt at working
with multi tab workbooks so I really appreciate your help). The column
headings I need to base my copy and paste on are titled, "Match" and
"OriginalTBL" (there are 4 other columns but I wont' be using those in the
sort criteria at all) on all my sheets.

My book has 12 tabs labeled "All Records", "Confirm", "GESV", "GESA" and so
on. I only want to copy and paste the rows from the "All Records" table to
the "Confirm" tab the meet the criteria of "No Match" in the "Match" column
and "Confirm" in the "OriginalTBL" column.

On a separate tab I want to copy and paste the rows from the "All Records"
tab to the "ConfirmALL" tab that meet the criteria of "No Match" and "4-$" in
the "Match" column and "Confirm" in the "OriginalTBL" column.

I have many other taps to code but I know if I get help with these two, I'll
be on my way. Thanks so much. Joyce

I found a free excel template that can extract specific data from
multiple pdf documents and display the results in excel. It is useful
for extracting information such as the total amount from multiple
invoices as is demonstrated in the example on the site. The software
uses regular expressions to match patterns and is fully customisable.

Check it out at

No luck finding an answer? You could always try Google.