Hi, I have 12 months of data spread across columns and need to compare data in last 6 months and update the Comment column based on two conditions. 1) Update comment as Adjusted if value goes down in any of the last 6 months. 2) Update comment as Not adjusted if value is remains same or increases in last 6 months.
Note :12 months input is dynamic represents last 12 months from current month
Appreciate for your help on this.
Account | 202101 | 202102 | 202103 | 202104 | 202105 | 202106 | 202107 | 202108 | 202109 | 202110 | 202111 | 202112 | Comment |
A | 10330 | 10330 | 10330 | 10330 | 10330 | 10330 | 10330 | 3470 | 8347 | 8347 | 9420 | 9420 | Adjusted |
B | 1485 | 1485 | 1485 | 1485 | 1485 | 1485 | 1485 | 1485 | 1485 | 1768 | 2360 | 2360 | Not Adjusted |
Solved! Go to Solution.
Hi @JJ523 ,
what about creating a formula from the field names and handing over this formula to a macro?
I get the field names using a Field Info tool, select the numeric fields only, keep the last 6, use a Summarize tool to build a formula and a macro for execution.
What do you think, could it be an approach?
Best,
Roland
hi @atcodedog05 @RolandSchubert, both of your solutions worked. I preferred to go without macro to make it simple. Thanks a ton :)
Happy to help : ) @JJ523
Cheers and have a nice day!