Good morning
Before I go any further, I want to explain that I thought I knew what I was doing in Excel until I saw a spreadsheet that one of my colleagues was working on and realised that in actual fact I know very little, despite being a SQLDBA of many years' standing.
For reasons that I won't bore you with, I have a spreadsheet that I use for keeping track of my daily work activities. Each row in the spreadsheet contains details of one activity, complete with exact durations calculated as both hour & minute durations (hh:mm) and decimal values (again for reasons I won't bore you with). The row contains a lot of information, including the type of work it is (standard or overtime).
I want to create a pivot table that lets me see a breakdown of my weekly activity, broken into Standard hours and Overtime hours. Setting up the pivot table was easy enough, but one of the things I want to include is the start and end date for each week, and this is where I run into problems.
I've got a hidden column in the spreadsheet that uses the WeekNum function to determine the current week number of the date that's been entered and that works fine. However, I want to enhance it so that I know that the activity in week 23 started on 3rd June and ended on 7th June. The problem that I'm having though is getting my head around the calculations that I'd need to put in. In English, what I think I need to do is get the minimum value for date in the whole spreadsheet where the Week Number column matches the week number in the current row. I would then want to do the same again for the maximum value.
Can anyone help me?
Bookmarks