Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have tables loaded on my Excel from Power Query. Some columns do not retain the data type and format I have specified in power query. For Example: Percentage type changes to Decimal(87.82%>0.878236484) and date type changes to Number(1/1/2020>43831) I hope to write VBA code to change the column data type by specifying the table name and column field header.
Kindly help with this.
Thank you.
Solved! Go to Solution.
Hello, @Jimmy801 Thank you for taking the time to reply to my question. Yes, i understand we would need to format the data type back on excel. I just wanted to automate that with VBA. I found the code to do that.
Thank you.
Hello @Anonymous
Power Query is loading the raw data to Excel. For a date this means a number and percentage is 0,xx. So the only way is to reformat your data in Excel once again. Don't forget to change the settings to keep changes of your format. So you don't need to write a VBA as long your column settings does change frequently.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello, @Jimmy801 Thank you for taking the time to reply to my question. Yes, i understand we would need to format the data type back on excel. I just wanted to automate that with VBA. I found the code to do that.
Thank you.