Results 1 to 6 of 6

Macro that finds (scrapes) some values from a CSV-table or PDF and input them in a report

Threaded View

Kirito-kun Macro that finds (scrapes)... 10-01-2015, 07:27 AM
Kyle123 Re: Easy first Macro! Find... 10-01-2015, 07:28 AM
Kirito-kun Re: Easy first Macro! Find... 10-01-2015, 07:33 AM
Kyle123 Re: Macro that finds... 10-01-2015, 07:37 AM
Kirito-kun Re: Macro that finds... 10-01-2015, 07:55 AM
Kyle123 Re: Macro that finds... 10-01-2015, 08:04 AM
  1. #1
    Registered User
    Join Date
    10-01-2015
    Location
    Aincrad
    MS-Off Ver
    2010
    Posts
    3

    Red face Macro that finds (scrapes) some values from a CSV-table or PDF and input them in a report

    Hello Internet!

    I have a spreadsheet where I make some very simple calculations. We could call it a report, where I divide some single cells with others and get ratios and growth rates etc. (very simple stuff).

    Anyway..
    Every week, I input new values into some of the cells in this report and I get a new output of ratios and figures for that week. It's only a matter of three or four cells where I need to change to the new values. I find these figures in a PDF that a bank sends me weekly. So I usually scroll through the PDF to find the new figure, and I copy it, and I paste it into a cell in my spreadsheet and my calculation is updated.

    What I'd like to do is to automate this entire process. I want to set up a macro that can go fetch that figure in the PDF and update my input cell with the new value so that I get an updated output value with the push of a button. That would be so neat!


    However, I have no idea how to set this up. I don't really need to import an entire data set, only those three or four values in the massive table that is inside the PDF.

    I realize that Excel might not be able to scrape a PDF, so I've asked the bank to send me CSV:s of the same table that is usually in the PDF. Perhaps a CSV makes this whole thing easier and I could avoid using a third party scraping software?

    ... So I guess what I instead should try to do is to make a macro that with the push of a button, goes into a certain folder, finds the latest CSV that I've downloaded, imports the CSV to a new sheet in Excel, then searches through the new table, and finds the cell where the figure I'm looking for is, then takes that value and puts it in the input cell in my little report sheet, and thus updates the output to the new weeks value.

    I specifically need the macro to search through the CSV-made table to find the figure, because the table will vary in size, and the value I want to extract doesn't always show up in the same spot (nor at the same pdf-page for that matter).

    I think the hard part is scraping the CSV (or PDF) for a single value that doesn't always show up in the same place. And also having the macro finding each weeks new file in a folder and update the data table. I think the scraping could be achieved by having the macro find the value by using the row and column name, which should be the same each time, though it ends up on a different page depending on the length of the table. And I think the automatic importing of the newest CSV data set could be achieved by simply naming the file the same thing in the folder, replacing the old one every week upon downloading it.

    I've been Googling for a couple of days to learn how to what I've attempted to describe above, but without luck. So now I figured I'd try my luck with the community! Any help would be massively appreciated, I'd really like to learn how to increase efficiency through macro-making, and this is a great opportunity for learning some basics. Thanks to anyone who took the time to read this. Once I've learned some more I'll be sure to also contribute to the community by helping others.

    I've also posted this question in these 3 places (but so far without success, I'll be sure to mark all these posts as SOLVED once someone has been kind enough to help me out):
    mrexcel. com /forum/excel-ques tions/ 890878-lets-make-macro-can-find-scrape-value-csv-table- input-cell-report.html
    excelguru.ca/forums/showthread.php?4968-Macro-that-finds-%28scrapes%29-some-values-from-a-CSV-or-PDF-and-inputs-them-in-a-report&p=20473#post20473
    answers. microsoft. com /en-us/office /forum/office_2010-excel/ lets-make-a-macro-that-can-find-scrape-a-value /9c81e7fc- 9fbc-4984-8704-0c161d3bd1c4?tm=1443532471812&auth=1



    Cheers!
    Last edited by Kirito-kun; 10-01-2015 at 07:50 AM. Reason: Complaints about previous title

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Scrape Amazon listing details into table
    By cfcMalky in forum Excel General
    Replies: 2
    Last Post: 12-05-2014, 04:50 PM
  2. Learning Curve: Using a macro to input data from an invoice into an expense report
    By brazilianch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2014, 02:13 PM
  3. Replies: 0
    Last Post: 10-16-2013, 10:58 AM
  4. Easy way of copying a table into a macro?
    By TomWolowiec in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-22-2013, 06:01 PM
  5. find and return multiple matches in a table, then sum and report total
    By cyclops755 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2013, 06:57 PM
  6. Find data in table from from two input conditions?
    By gdallas in forum Excel General
    Replies: 4
    Last Post: 02-11-2010, 12:31 PM
  7. Is there an easy example to create a Pivot Table within a macro
    By Mark in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2006, 01:00 PM

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