Financial Reporter - Dynamic .ColSpec?

Posted by: Hugh

Financial Reporter - Dynamic .ColSpec? - 09/16/22 03:30 PM

Hi All!
I'm building a report to skip over Covid so I can compare current months to corresponding pre-covid months... In some instances I'm looking for the month that's two years ago {2} and sometimes it's three {3}...
Is there a way to toggle back and forth using a numeric input somehow so I'm typing 3 into a cell instead of navigating to the formula bar, highlighting the 2 and then typing 3?
Alternately, there seems to be a bit of a pull down list on the .ColSpec line, but I don't know how to populate it... if it had {2} and {3} that would be great, but it has some other random selections instead...
Thanks for any thoughts!
Posted by: Retired_Guy

Re: Financial Reporter - Dynamic .ColSpec? - 09/17/22 01:50 PM

You can include a reference to another Cell in the specification formula. Just make sure that you put '2 or '3 in the cell so that the spreadsheet "knows" you mean the text string "2" and not the number 2. The "&" operator combines bits of text (concatenates strings) or you can use the STRCAT() function.
Posted by: Hugh

Re: Financial Reporter - Dynamic .ColSpec? - 09/19/22 02:05 PM

I'm obviously syntax challenged... if I put {3}M in the colspec line I get a report. If I put '3 in cell G4 and {G4}M in the colspec line I get a thousand errors... *sigh*
Posted by: Hugh

Re: Financial Reporter - Dynamic .ColSpec? - 09/19/22 02:06 PM

wait, what? RETIRED GUY???? Congratulations Andrew!
Posted by: Bruce Gardner

Re: Financial Reporter - Dynamic .ColSpec? - 09/19/22 06:52 PM

Hi Hugh:

The Retired Guy loves to answer the Financial Reporter challenges, but in case you're in a hurry:

If G4 contains '3 (note the leading single quote, just like in Excel)

Then your Colspec cell would be : ="{"&G4&"}"&"M" (The brackets are brace brackets)
Posted by: Hugh

Re: Financial Reporter - Dynamic .ColSpec? - 09/20/22 10:21 AM

Copy that Bruce! Thanks!