Is it possible to create a conditional rollup for $'s OR display the max value for %'s?
I am working on a smartsheet tracker that can track the cost savings of specific projects on a month to month basis, then rolls up the total YTD savings. There is also an option for the users to enter their project progress as a percentage, in which case I would want the YTD column to display the maximum % from the year (assuming that they entered cumulatively). I have tried a few different formulas to attempt this, but no luck. The formula will need to be a column formula, since I will not know whether the project will be entered into the template as $ or %.
The month to month tracking is done across a single row (January to December), if $ are present, I would like the cells to be totalled SUM([JAN-21:DEC-21]). If % are present, I would like MAX(JAN-21:DEC-21) to be displayed. My question is what would be the best method to mix the two into one formula?
=IF([JAN-21]32:[DEC-21]32 CONTAINS("$", [JAN-21]32:[DEC-21]32), SUM([JAN-21]32:[DEC-21]32), MAX([JAN-21]32:[DEC-21]32) ....
resulted in UNPARSEABLE
Answers
-
The issue is going to be with the first portion of the IF statement. Try this instead...
=IF(CONTAINS("$", [JAN-21]32:[DEC-21]32), SUM([JAN-21]32:[DEC-21]32), MAX([JAN-21]32:[DEC-21]32)
The CONTAINS function outputs a true/false value, so it can be used as a "standalone" for a "logical statement".
-
Thank you, Paul!
Is there any way for my YTD column to format to % or $ (currency) based on the monthly data?
-
The formatting would have to be done manually. If you are only using the output for display, you could include the formatting in your formula, but that would then output text strings which you won't be able to add/subtract/etc.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 422 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!