Hi I wanna create a workbook containing all the macros I am likely to need.
I will have a table already downloaded and the first macro I wanna create involves adding additional columns from AU with these headings
AU= =IF(LEN(J2)=6, LEFT(J2,3)&" "&RIGHT(J2,3), LEFT(J2,4)&" "&RIGHT(J2,3))
AV= =[@ID]
AW= =[@[Patient Forename]]
AX= =[@[Patient Surname]]
AY= =[@Postcode]
AZ= =IF([@[Preferred Address Line 1]]="",[@[Preferred Address Line 2]],[@[Preferred Address Line 1]])
BA= =[@Employer]
The second macro is similar. I want to add columns with these headings from CB
CB==IF(LEN(J2)=6, LEFT(J2,3)&" "&RIGHT(J2,3), LEFT(J2,4)&" "&RIGHT(J2,3))
CC= =[@ID]
CD==[@[Patient Forename]]
CE==[@Surname]
CF==[@Postcode2]
CG==[@[Address Line 1]]
CH will have no formula
I will then save these files based on the most recent date.
I am not sure if it's possible to automatically execute a SQL query, then import the most recent files to a certain destination and close afterwards. I get the data from a power BI dashboard with a URL like https://app.powerbi.com/groups/me/apps/....... I have power BI on my computer so maybe I can automate this.
I will have a table already downloaded and the first macro I wanna create involves adding additional columns from AU with these headings
Postcode | ID_for_db | Firstname_for_db | Lastname_for_db | Postcode_for_db | Address_for_db | Employer_for_db |
AV= =[@ID]
AW= =[@[Patient Forename]]
AX= =[@[Patient Surname]]
AY= =[@Postcode]
AZ= =IF([@[Preferred Address Line 1]]="",[@[Preferred Address Line 2]],[@[Preferred Address Line 1]])
BA= =[@Employer]
The second macro is similar. I want to add columns with these headings from CB
Postcode2 | ID_for_db | Firstname_for_db | Lastname_for_db | Postcode_for_db | Address_for_db | Employer_for_db |
CB==IF(LEN(J2)=6, LEFT(J2,3)&" "&RIGHT(J2,3), LEFT(J2,4)&" "&RIGHT(J2,3))
CC= =[@ID]
CD==[@[Patient Forename]]
CE==[@Surname]
CF==[@Postcode2]
CG==[@[Address Line 1]]
CH will have no formula
I will then save these files based on the most recent date.
I am not sure if it's possible to automatically execute a SQL query, then import the most recent files to a certain destination and close afterwards. I get the data from a power BI dashboard with a URL like https://app.powerbi.com/groups/me/apps/....... I have power BI on my computer so maybe I can automate this.