Previous Thread
Next Thread
Print Thread
Joined: Sep 2013
Posts: 191
Adagio Maven
Adagio Maven
Joined: Sep 2013
Posts: 191
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!

Last edited by Hugh; 09/16/22 08:30 PM.
Joined: Mar 1999
Posts: 10,504
Adagio Master
Adagio Master
Joined: Mar 1999
Posts: 10,504
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.


Andrew Bates
Joined: Sep 2013
Posts: 191
Adagio Maven
Adagio Maven
Joined: Sep 2013
Posts: 191
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*

Joined: Sep 2013
Posts: 191
Adagio Maven
Adagio Maven
Joined: Sep 2013
Posts: 191
wait, what? RETIRED GUY???? Congratulations Andrew!

Joined: Jun 2004
Posts: 3,692
B
Adagio Wizard
Adagio Wizard
B Offline
Joined: Jun 2004
Posts: 3,692
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)

Joined: Sep 2013
Posts: 191
Adagio Maven
Adagio Maven
Joined: Sep 2013
Posts: 191
Copy that Bruce! Thanks!


Moderated by  Softrak Support 

Link Copied to Clipboard
Who's Online Now
0 members (), 97 guests, and 3 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums5
Topics14,679
Posts71,625
Members1,874
Most Online1,408
Dec 9th, 2025
November
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Powered by UBB.threads™ PHP Forum Software 8.0.0