PDA

View Full Version : Excel report generation and export to pdf



borkor
05-09-2019, 02:09 AM
Hello to all!




So first of all I would like to apologize if I am repeating the thread that was already discussed and answered! I did look through the forum but I could not find any similar threads that deal with the "problem" that I have. Maybe I missed them somehow. If that is the case, please reffer me to the threads.




So what I am trying to build is a fairly simple table in sheet1 with drop down list and few text cells, nothing complicated. In the report sheet, I created also a drop down list, which is used in the vlookup functions that pull the data i need from the table to the report. So if i choose "name1" vlookup will go trough the table on sheet1 and pull all the data related to name1 and put in my report layout. This works fine. The problem is that the vlookup does not copy the formating from the source cell. So if my cell A1 in table has expanded in width or height, corresponding cell in report will not expand and thus it will not show completely the information i need. Can you please help with this?




Second problem I have is with exporting to pdf. So as I said, when I choose for which "name" I want the data to be pulled into report, report sheet is filled with these data (layout adjusted to be A4). With button click "PDF" I can create pdf file with 1 page report for the chosen "name". My question is how to automate it, using macros, so it goes through all of my "names" pulls the data for each name, writes a report A4 in pdf and then does the same for other names and stores everything in ONE pdf file?


So to summarize, I need help regarding vlookup and copying the format of the cell also in the report. Also i need 1 page pdf export ( please advise on how to save the pdf file with the name of the "name" that is being used to extract the data, for example if i am showing data in report for BORKO, then the pdf should be named borko.pdf) and multi page pdf export which saves all of my report A4 pages in ONE pdf file.


I will attach a example file so you can know what I was talking about.




Thanks a lot in advance!
Borko

24199

borkor
05-13-2019, 02:19 AM
Hi,

If my explanation was not good, I can give it one more try?
Could anyone please join the discussion, I really need help with the issues!

Thank you in advance,

Have a nice day,

Borko