I am really new to this and I apologize if i am in the wrong section of the forum.
Basically i need help with something simple and very generic. I have two excel files and all i want to do is import data from wb2 to wb1 and put everything in a nice bar chart or pie chart.
Only thing to notice is that wb2 is really long and has more info than i need to import and the charts on wb1 have to update automatically every time wb2 updates.
I have written something really simple and i am sure i will be laughed at but its a hobby and i try to learn on my own for fun.
Below is the code:
I am not asking for anyone to rewrite my code, all i am asking is if you could please point me to the write direction as of how to manage importing an excel file and only import specific fields instead of selecting each field (B15 to A56 and etc.).
Private Sub Button2_Click()
Dim Wb1 As Workbook
Application.ScreenUpdating = False
Set Wb1 = Workbooks.Open("C:\path\to\file.xls")
ThisWorkbook.Sheets(3).Range("B12").Value = Wb1.Sheets(1).Range("AT26").Value 'Monday Call Presented
ThisWorkbook.Sheets(3).Range("B13").Value = Wb1.Sheets(1).Range("AT28").Value 'Tuesday CP
ThisWorkbook.Sheets(3).Range("B14").Value = Wb1.Sheets(1).Range("AT30").Value 'Wednesday CP
ThisWorkbook.Sheets(3).Range("B15").Value = Wb1.Sheets(1).Range("AT32").Value 'Thursday CP
'ThisWorkbook.Sheets(3).Range("D10").Value = Wb1.Sheets(1).Range("AT34").Value 'Friday CP
and so on.
If you could please point me to the write direction I will read and do my best to improve that ugly looking code above.
Thank you in advance and if you have any questions please let me know.