Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Formula for returning value based on dates

I have a main sheet and a reference sheet. On the main sheet there is a Payroll Period which is based on a Shift Date column. However, I want to add a formula that refers to a reference sheet whereby I have two dates. If the Shift date falls within the Start Date and End Date of a pay period, I want the formula to return the value from the period Column see below.

Main sheet:

Reference sheet:

Ive tried using:

=INDEX(COLLECT({Period}, {Pay Period Start}, [Shift Date]@row >=@cell, {Pay Period End}, [Shift Date]@row <= @cell), 1) and am getting an #Invalid value error and cannot figure out what is wrong.



Any thoughts?

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions