# I would like Smartsheet to Return Number of a Pay Period based on Current Date

Hi everyone. Thank you in advance for trying to help me. Here is what I have.

Based on Today's Data aka Current Date.. I would like to my Pay Roll Information sheet and return the Number of PP. Based on this current date, It should return 6. This sheet contains my Pay Period Information

I am trying to get it to return to my Employee Information sheet so I can calculate the number of PTO Hours.

I have tried several formulas. These are just a couple...

INDEX(COLLECT({Payroll Information Num PP}@row, {Payroll Information PP End}@row, >=[Current Date]@row)

=IF(AND({Pay Period Begins}@row <=TODAY(), ({Pay Period End}@row >=TODAY()), ({2024 PP Number}@row)))

• ✭✭✭✭✭✭

Hi @Catly,

as i understand from your formula you are trying to count the number of [Pay Period Ends] which is less than or equal today, if this is your case please try the following formula:

```=IFERROR(COUNTIFS({Payroll Information PP End}, @cell <= TODAY()), "")
```

and if you like to create formula to count count the number of [Pay Period Ends] which is less than or equal specific day [Current Date] you add it manually if this is your case please try the following formula:

```=IFERROR(COUNTIFS({Payroll Information PP End}, @cell <= [Current Date]@row), "")
```

bassam.khalil2009@gmail.com

• ✭✭✭✭✭✭

Hi @Catly,

as i understand from your formula you are trying to count the number of [Pay Period Ends] which is less than or equal today, if this is your case please try the following formula:

```=IFERROR(COUNTIFS({Payroll Information PP End}, @cell <= TODAY()), "")
```

and if you like to create formula to count count the number of [Pay Period Ends] which is less than or equal specific day [Current Date] you add it manually if this is your case please try the following formula:

```=IFERROR(COUNTIFS({Payroll Information PP End}, @cell <= [Current Date]@row), "")
```

bassam.khalil2009@gmail.com

• Thank you. You helped me a lot. It worked. Not sure why I was trying to make it so hard.

• ✭✭✭✭✭✭

you are welcome @Catly

bassam.khalil2009@gmail.com