• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Formula assistance

Ketan Mehta

New Member
Hi

I would be grateful for assistance with a formula that I require.

In the attached spreadsheet, the activity sheet shows type of study, week number, Day, start and end times, I would like to enter a formula in the Date field (Yellow column) that looks at all the week number and Day in the Dates sheet and outputs the correct date in the yellow column.

For example, row 8 on the Activity sheet has week number 22 and the day is a Monday, the formula would look at this in the Dates sheet and the date for this is 18/02/2019, this is what should be returned in the date field (yellow column) by the formula. I want a formula to return all dates.

Thanks
 

Attachments

  • Formula Assistance.xlsx
    20.1 KB · Views: 5
An alternative approach that doesn't need to use the 'Dates' table.
= (base-1) + 7*([@[Week number]] - 1) + MATCH([@Day], DaysOfWeek,0)
where 'DaysOfWeek' is the named constant
={"Monday","Tuesday","Wednesday","Thursday","Friday"}
 

Attachments

  • Formula Assistance (PB).xlsx
    24.9 KB · Views: 5
Again, not needing a DATES sheet at all, no defined names and minimal alteration to the existing sheet, put date 24th Sept 2018 in cell G1 and this formula in cell F2:
Code:
=(B2-1)*7+$G$1+MATCH(C2,{"Monday","Tuesday","Wednesday","Thursday","Friday"},0)-1
and copy down.
It uses the same principle as Peter Bartholemew's solution.
 
Last edited:
Back
Top