Forum Discussion
How to Automate Data Submission Table w/ VBA
I'm eager to automate a data submission screen by creating formulas to transform and load data into a separate tab in a format that is digestible by one of our upstream reporting systems.
In short, data is entered into a table with fiscal period on its x-axis and gl account on its y-axis. Furthermore, cost center and profit center are parameters that can be changed.
My goal is for users to input their data in the data submission table and have a macro that automatically populates the 2nd tab since all dimensions can be found on the first screen. Users will plan out the entire fiscal year by gl account for each profit center and cost center combination under their purview. This will require some transformation and looping logic since a user will need to click the macro button for every profit center and cost center combination.
Attached are pictures of the data submission table and the 2nd tab used for uploading data into our reporting system. While I'm proficient in VBA, I do know enough and have worked enough with VBA to follow logic and develop myself with proper guidance. Appreciate your assistance in advance!
2 Replies
- m_tarlerBronze Contributor
I'm not sure but it looks like you just need either a pivot table, or formulas to mimic a pivot table (which many simply be PIVOTBY().
Something like:
=PIVOTBY( [Account], EOMONTH( [Date], 0), [Amount], SUM, 0, 0,, 0,, ([Cost Center] = A2)*([Profit Center] = A1) * ([Date] >= DATE(2024, 7, 1) ) )
- wdeerCopper Contributor
Thanks, I'll check it out. I was hopefully for a more user friendly option that included a macro button users could click but simplicity is best if it works.