IF Statement Primary Column Work Around


I want to have a Function statement in Smartsheet that identifies if a Date is entered in another field, then an Auto-Number (sort of) is created in the Primary column.

So, IF Week Ending = "yes", THEN Week = "prior row number +1"


  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Dan Eshleman

    There isn't a way to automatically be able to reference the row above in a formula, you would need to add in some Helper Columns with other formulas to help get that information. @Leibel S has a great solution for how to do this on this other post, here.

    Create 2 columns:

    • "LINE-ID" : Auto Number Column
    • "ROW#" : Column Formula: =MATCH([LINE-ID]@row, [LINE-ID]:[LINE-ID], 0)

    This will allow you to run a check on a previous row value by using Index(column:column, [ROW#]@row -1)

    Would this work for you? I'm not sure I quite understand how you're looking to number your rows. It would be helpful if you could post a screen capture with a few more rows of data identifying what you want the formula to do, if possible.



  • Dan Eshleman

    Possibly. I got stuck in some other issues on other projects. I will take a look at this solution. Thank you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!