Week number comparison

Options
Mary Kam
Mary Kam ✭✭✭✭
edited 09/27/22 in Formulas and Functions

=IF($[STUDY NUMBER]@row = "", "", IF($[STUDY NUMBER]@row = "EMPTY", "", IF(AND(WEEKNUMBER($ARRIVAL@row) <= [WK 39 SEP 26]$1, WEEKNUMBER($[END DATE]@row) >= [WK 39 SEP 26]$1), $[# FLOWERS]@row, IF(AND(YEAR($ARRIVAL@row) <= 2021, WEEKNUMBER($[END DATE]@row) >= [WK 39 SEP 26]$1), $[# FLOWERS]@row, IF(AND(WEEKNUMBER($ARRIVAL@row) <= [WK 39 SEP 26]$1, YEAR($[END DATE]@row) >= 2022), $[# FLOWERS]@row, IF(AND(YEAR($ARRIVAL@row) < 2022, YEAR($[END DATE]@row) >= 2022), $[# FLOWERS]@row))))))

[WK 39 SEP 26]$1 is just below the column header with a 39.

Arrival dates and end dates vary with different years and months etc.. I am looking for a formula that fits all scenerios, where if the dates fit within the weeknumber and is in year 2022 I want a return value.

Note the 7 in red should not give a return value.

Thanks

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!