Forum Discussion
PaddyB
Dec 25, 2021Brass Contributor
Import Excel and Sort by eMail-Domain
Hi all merry XMAS to you all I use the time to get some "long term wish" fixed but no luck at all - excel is not my "world" 🙂 my problem ist I get every month a CSV from one of our "Saa...
NowshadAhmed
Dec 29, 2021Iron Contributor
In vba, a statement would generally check if there is a sheet by the domain name, and then create one if missing.
Another statement would lump the email addresses of a domain to the respective sheet.
This way, the user won't have to worry about the code for new domains because the codes are general and not specific to domain names.
Then assign a button to initiate the task and do everything automated.
However, for the current task the user needs, vba and power query is over engineering in my opinion. A simple formatted/structured table is more than enough, assuming it is only list of domain names. Here the formula for spliting the domain names will also help him filter effectively.
Another statement would lump the email addresses of a domain to the respective sheet.
This way, the user won't have to worry about the code for new domains because the codes are general and not specific to domain names.
Then assign a button to initiate the task and do everything automated.
However, for the current task the user needs, vba and power query is over engineering in my opinion. A simple formatted/structured table is more than enough, assuming it is only list of domain names. Here the formula for spliting the domain names will also help him filter effectively.
Yea_So
Dec 29, 2021Bronze Contributor
How is creating one power query against a CSV file, then creating a reference query filtering for each domain sheet over engineering?
Come now iterate the procedures of updating each domain sheet every time there is a CSV update.
With power query by folder, after the
1. initial setup of each domain sheet
2. all the op has to do is drop the new CSV file into the queried folder
3. then press Ctrl+alt+F5 and it updates the main query and all the reference queries.
4. and if there are new domain sheets to setup just create new reference queries for the new domains, filter the appropriate domain within the reference query then close and load to a new sheet and save the workbook so the next time there is another CSV update all the op has to do is steps 1 thru 3.
Now iterate the procedure involved using formatted structured table to update each domain sheet below and let the op decide which solution they would prefer to use.