Hey all,
This is a tough one that's been bugging me for weeks. I will try to provide an example as clear as possible. It will be very basic but will hopefully convey what my problem is.
I am currently mapping an Excel document of a Trial Balance (A) into another Excel sheet (B) with their respective rows and account numbers.
It looks like this:
Trial Balance example (A)
Account Number | Account | Amount |
101 | Income Tax | 10 |
102 | Sales | 20 |
103 | Expenses | 30 |
104 | COGS | 40 |
Excel sheet (B)
Account Number | 02/03/2023 | 03/03/2023 | |
Income Tax | 101 | ||
Sales | 102 | ||
Total 1 | Total 100 | ||
Expenses | 201 | ||
COGS | 202 | ||
Total 2 | Total 200 |
I have set my output column equal to it's account numbers so I can easily perform a Find and Replace to substitute the account numbers with their respective values like so:
(A) before Find and Replace:
Account Number | 02/03/2023 | 02/04/2023 | |
Income Tax | 101 | 101 | |
Sales | 102 | 102 | |
Total 1 | Total 100 | Total 100 | |
Expenses | 201 | 201 | |
COGS | 202 | 202 | |
Total 2 | Total 200 | Total 200 |
(A) after Find and Replace:
Account Number | 02/03/2023 | 02/04/2023 | |
Income Tax | 101 | 10 | |
Sales | 102 | 20 | |
Total | Total 100 | 30 | |
Expenses | 201 | 30 | |
COGS | 202 | 40 | |
Total | Total 200 | 70 |
The two subtotals were calculated separately and replaced afterwards.
So I've set up my entire workflow to have the output column to 02/03/2023. It is a lot more complex than this example.
SO, here comes my question...Is there a way to change my output column to 02/04/2023 in a dynamic way?
I've heard about using a Control Parameter and an action tool but I can't seem to get that to work. I could possibly change my initial output column (02/03/2022) to the word "Value" and then change the value of "Value" but I'm unsure how to do that.
I'm well aware I would have to connect this Control Parameter to each tool needing it which is fine, I just don't know how to set it up.
PLEASE HELP I WILL BE FOREVER IN YOUR DEBT
Hi @BenJones13 - You can change the value of "Value" using a Dynamic Rename tool. Please review the following example:
Hey Ben, I'm attaching this here as the example we walked through, but it may be useful if someone else can take it and make it more relevant to support. This control parameter example, enables you to filter the data that goes through the process, by the column name. No need to change the column name to value anymore, but you will have to change your existing workflow to meet the process in the middle. You could also add an interface tool to adjust the file within the macro too. But that is the next stage.