Old Version MaxIf

I have a table of documents that include document number and revision. I want to "check a box" if the document number has a higher revision number listed.

Such as if the information was:

So I would want it to return a checkbox on Doc 1 Rev 1 since the revision has a higher number for the document. I want to set it up to whenever a "checkbox" is 1, it will move that row to an "old revision smartsheet".

Answers

  • Jgorsich
    Jgorsich ✭✭✭✭✭

    I'm having trouble parsing exactly what you want to do - if you want it to automatically fully move (delete the row from one and move it to another) or just be pulled formulaically onto other sheet.

    Either way, from your title it sounds like you could make it happen as long as you could make something work like a maxif() formula…

    =if(rev@row=max(collect(rev:rev,doc:doc,doc@row)),"this is current","this is old")

    seems like it would get the job done for you. Basically, use a max(collect()) to simulate a maxif().

    Hopefully that is somewhat helpful…

  • Pestomania
    Pestomania ✭✭✭✭✭

    Hi Jgorsich,

    Looking forward to MaxIf being added to standard repertoire for Smartsheet. This is the final formula I used in the sheet, yours was perfect!

    =IF(Version@row = MAX(COLLECT(Version:Version, [Document Number]:[Document Number], [Document Number]@row)), "Current", "Obsolete")

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!