Forum Discussion
macro to search headers and copy/paste values into another worksheet
- Jan 23, 2024
Pushpa985 As I don't know how you have organized your files it's difficult to give a distinct answer. A good place to start learning about PQ would be the site in the link below. Read through the first page to understand what it's all about. Then, towards the end you'll find a list with 20 articles. Number 9 is probably going to be most useful to you (connecting to files from a folder). But take your time and scan through everything from the beginning so that you don't miss some of the basic principles.
Pushpa985 In stead of learning VBA/macros, I would recommend you to learn Power Query (PQ) in stead. This kind of task is super easy in PQ as you can connect to tables (where ever they are) and append them. It does not matter in what order the columns are, as longs as the column names are the same. PQ will match the column names automatically and you can sort them in any order you desire. Set it up once and you can repeat the process over and over again. I attached a small example in the attached file.
- Pushpa985Jan 23, 2024Copper ContributorHi Riny..I tried Power Query and thank you so much for introducing me to this. Could you please help me with 1 question: I tried and achieved the result with 1 file.Now I want to save that query and repeat the process whenever I want and on the files that I choose(as mentioned by you).How to achieve that ? I try reading and doing. But it leads to nowhere. Thanks in advance.
- Riny_van_EekelenJan 23, 2024Platinum Contributor
Pushpa985 As I don't know how you have organized your files it's difficult to give a distinct answer. A good place to start learning about PQ would be the site in the link below. Read through the first page to understand what it's all about. Then, towards the end you'll find a list with 20 articles. Number 9 is probably going to be most useful to you (connecting to files from a folder). But take your time and scan through everything from the beginning so that you don't miss some of the basic principles.
- Pushpa985Jan 23, 2024Copper Contributorok. I look into it. Thanks a ton !
- Pushpa985Jan 22, 2024Copper Contributorok Riny..thanks a ton for the reply. I appreciate your suggestion and try it and let u know.Have a nice day .