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
-
Make sure all three columns are date type columns. What are the formulas used to populate the dates in the reference sheet?
Answers
-
Make sure all three columns are date type columns. What are the formulas used to populate the dates in the reference sheet?
-
that could be the issue, Thanks Paul! those formulas are point to date columns, so I can see now how those columns could then be represented as non date columns. I'll give it a try.
-
that fixed it.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.3K Get Help
- 463 Global Discussions
- 156 Industry Talk
- 508 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 81 Community Job Board
- 517 Show & Tell
- 35 Member Spotlight
- 3 SmartStories
- 307 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!