How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask The-PC-Guy Your Own Question

The-PC-Guy
The-PC-Guy, Software Engineer
Category: Programming
Satisfied Customers: 1844
Experience:  Extensive Knowledge in PHP, MYSQL, CSS & Javascript
62934938
Type Your Programming Question Here...
The-PC-Guy is online now
A new question is answered every 9 seconds

I'm using a macro where I copy data from a PDF file

Customer Question

Hello,
I'm using a macro where I copy data from a PDF file and paste it into A1
Then I copy and paste data from another PDF file into B1
I run the macro
When I copy and paste data from Excel, the macro doesn't work properly.
Is there hidden code somewhere that's telling it to only look at PDF data?
Is there an easy way to switch it to look at Excel data instead?
I'm not an expert at this, your help will be appreciated.
Thanks,
Jeff
Submitted: 1 year ago.
Category: Programming
Expert:  Russell H. replied 1 year ago.
Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question. I need to ask a few questions:- What program are you running the macro in, is it in Excel, or in some other program, that you start the macro?- What PDF reader are you getting the PDF data from? or, is the PDF data gotten straight from a PDF file, without any PDF reader being used?- What type of data is being read from the PDF, is it the text portion perhaps?
Customer: replied 1 year ago.

I'm running the macro in Excel

I'm using Adobe Acrobat XI Pro

The type of data is general.

Expert:  Russell H. replied 1 year ago.
Can you get data from Excel, before you get data from Acrobat XI Pro (or, from a PDF file) ?When the macro fails to work properly, as regards ***** ***** data, what happens? is there an error message, for instance?
Customer: replied 1 year ago.
The macro was created by your team at Just Answer a few years ago.
It was designed to use PDF data
I want to switch the macro worksheet to use Excel data instead.When running the macro, it doesn't fail.....no errors.
The macro works fine.The macro is designed to extract data from one cell, then extract data from another cell.
If those two extractions are an exact match, then print certain information in another cell.So, if I the extracted data in both cells are PDF and is not a match, I can manually change the data, run the macro again and it will match.
But if I used Excel data, then It will match whether the data matches or not. So therefore it doesn't work correctly with Excel data.
Expert:  Russell H. replied 1 year ago.
How can the extracted data (to quote what you just said) be, " in both cells are PDF and is not a match" ?Are you getting the PDF 'cells' - ? - from Adobe Reader? or from a PDF file? or how?
Customer: replied 1 year ago.
I open a PDF file, copying and pasting information to A1,
I open another PDF file, copying and pasting "certain information" in B1,
Then I run the macro, if it finds "certain information in A1 that matches "certain information" in B1
Then it post the "certain Information" in C1
I'm not using Adobe Reader but the PDF files open in Adobe Acrobat XI Pro and is probably the same thing.
I open two saved PDF files, I copy and paste the information inside the PDF in A1 and the other information in B1Now what I want to eliminate is using the information inside PDF files.
I just want to copy and paste information from Excel.
Customer: replied 1 year ago.
Please disregard the 6th line. I open two saved................
I meant to delete that line.
Sorry !
Expert:  Russell H. replied 1 year ago.
OK. Thanks for the explanation in detail. I will have to be offline, unavoidably, for several hours. I will think over what you have said in the meantime. Thanks.
Expert:  Russell H. replied 1 year ago.
I need to ask, are the A1 info and the B1 info, in PDF files, and
is the C1 info in a MS Excel spreadsheet file?
And is the macro you run an Excel macro, or some other kind or run somewhere else?
Customer: replied 1 year ago.
They originated in PDF but I copied all and paste all in Excel A1 and B1
Yes it's an Excel macro that I run.
It's simple, I open the PDF file, copy all and paste all in Excel column A
I open another PDF file, copy all and paste all in Excel column B
Then I push the macro button, the answers are in Excel column C
Customer: replied 1 year ago.
Can I send you my saved Excel-macro program?
I can step you through the problem I'm having.
Expert:  Russell H. replied 1 year ago.
Sending me the macro would help me comprehend the problem, a lot faster. Please do. (You can send me files by contacting JustAnswer.com Customer Support and having them email it to me as an attachment. If that doesn't work, there are other means of doing so.) Anyway, your question relates to making the macro work if you copy and paste Excel data into col. A and/or col. B. As I understand it at present. You might want to mention your version of Excel - in case it is ancient or modern, which can make a difference. Thanks.
Customer: replied 1 year ago.
OK, I will need to do this tomorrow.
Thanks !!
Expert:  Russell H. replied 1 year ago.
Very good. I await seeing the code with interest. Tomorrow will do.
Customer: replied 1 year ago.
Hello Russell,
I've been working on it all day.
I thought I had it but I don't.
It's late and I'm going to bed.
Talk to you tomorrow
Expert:  Russell H. replied 1 year ago.
OK. I'm waiting to see the code, if you still want me to look at it.
Customer: replied 1 year ago.
Good Morning Russell,
It won't let me send a xlsm file to you.
Any ideas?
Jeff
Expert:  Russell H. replied 1 year ago.
Hi Jeff, good morning. Try posting the file to
www.wikisend.com
which is a free, drawback-free, easy-to-use file posting site that I can heartily recommend from many years experience.
Then copy the file posting URL, and Reply to me with it. That way I'll be able to see the file just fine. (It's a spreadsheet file, I presume. Is the macro included in it, if so?)
Customer: replied 1 year ago.
[URL=http://wikisend.com/download/914120/MARSH_PAYMENTS.xlsm]MARSH_PAYMENTS.xlsm[/URL]Also the program is Excel 2013
Expert:  Russell H. replied 1 year ago.
Got it. I will be examining it today, and post back to you by or before this evening. Thanks.
Expert:  Russell H. replied 1 year ago.
I'm sorry to have to say that all the ways I tried it, I could not examine the script itself. Could you just post me a file containing the text of the script itself? I might be able to examine it that way.
Customer: replied 1 year ago.
Good Morning Russell,
Sorry, but I don't have what you want.
I might have to re-create the entire thing.
Thanks for trying,
Jeff
Expert:  Russell H. replied 1 year ago.
I apologize for not doing better, and have Opted Out in case someone else here might be able to get the task in hand.The subject is a MS Excel macro, that compares imported data, or the like, and involves PDF data, and MS Excel data too.
Customer: replied 1 year ago.
Thanks Russell,
Have a great holiday!!
Jeff
Expert:  The-PC-Guy replied 1 year ago.
I think the confusion here might be the PDF.
You are saying that you are copying and pasting text from a pdf, I assume it is text, and you want to run some kind of macro on that text?
Customer: replied 1 year ago.
I open Adobe Acrobat Pro
I open a PDF file with information in it.
I copy the information
I paste it in my Excel macro program in cell A2I open another PDF file with different information in Adobe Acrobat Pro
I copy and paste that information into Excel macro cell B2Then I run the macro and it works great.The problem is,
I need to paste Excel data from one regular Excel program to my Excel macro program into sheet 3 cells A1 and B1
Then in sheet 3 I need to merge A1 and B1 into C1 by using =CONCATENATE(A1," ",B1) or some other formula that merges data.
Then I need to copy the merged Excel sheet 3 cell C1 data and paste it into sheet 1 cell A2The data that belongs in sheet 1 B2 will come from a PDF copy and paste just like it always did.
No change in that copy and paste PDF process.The PDF data in sheet 1 cell A2 usually looks something like this:
ID123456 $24.00
The PDF data in sheet 1 cell B2 usually looks something like this:
123456 24.00When you run macro, if cell A2 "123456" (6 digits to the right of "ID") matches cell B2 "123456"
and if A2 (the digits to the right of "$" and ".") are a match with cell B2, then cell C2 is true.
If C2 is true, then cell C2 = *123456*
If cells A2 and cell B2 don't match the C2 is "False"
If C2 is "False" then the background color in A2 turns orangeSo to experiment try changing the number 123456 in A2 to 12345, run macro and cell A2 should turn orange
Cell C2 should be blank.
Expert:  The-PC-Guy replied 1 year ago.
well, not sure I am following exactly, But I wouldn't even bother with a macro, if all you want to do is compare the values of 2 cells, that can be done with conditional formatting
Customer: replied 1 year ago.
I did not receive a confirmation on my request for a phone call.
I need to be called Monday thru Friday 7am to 2pm Indiana time
Expert:  The-PC-Guy replied 1 year ago.
I cannot make outgoing phone calls, However I can set up a conference line, or even better yet, if you want me to do a remote connection you can actually show me on your screen what you want to do. Let me know how you want to proceed. I will check back on monday
Customer: replied 1 year ago.
Sorry, my company will not allow you to remote in.
Expert:  The-PC-Guy replied 1 year ago.
then you will have to send me an example file, and we can set up a conference call on monday
Customer: replied 1 year ago.
OK, great.
I will send you the file Monday.
Talk to you then.
Thanks !
Customer: replied 1 year ago.
Good Morning,
How can I send you a few PDF and Excel files.
I will need you to call me after you receive these.
Expert:  The-PC-Guy replied 1 year ago.
i will communicate through here. you can use a website like wikisend.com after uploading they give you a file ID# ***** that ID# ***** also, from my understanding you wanted to work with this from just within excel, so no need to send me PDF files, did I missunderstand?
Customer: replied 1 year ago.
Never mind,
I think I just figured it out.
Thanks anyway !
Expert:  The-PC-Guy replied 1 year ago.
ok