I am given several start and end dates, with an x or y value attached. I need to count x values based on set weeks. How many x's will I need the week of Jan 8? and so on...
I am given several start and end dates, with an x or y value attached. I need to count x values based on set weeks. How many x's will I need the week of Jan 8? and so on...
Last edited by RuthN; 04-11-2017 at 11:27 AM.
Welcome to the forum!
Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.
1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.
2. Make sure that your desired solution is also shown (mock up the results manually).
3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).
4. Try to avoid using merged cells as they cause lots of problems.
Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Should have waited until I had the file ... and re-read requirement!!!
Last edited by JohnTopley; 04-12-2017 at 02:36 AM.
:/ this returned a 0 value for all rows...thanks anyway
... that is (in part) because the dates are not Excel date format and my formula was wrong!.
Last edited by JohnTopley; 04-11-2017 at 04:17 PM.
After converting the text "dates" to numbers this formula doesn't return the results you expect. I have tried several different interpretations and WEEKNUMs starting days and can not duplicate what you show.
=SUMPRODUCT(--(WEEKNUM($F2,1)>=WEEKNUM(--$A$2:$A$19,1)),--(WEEKNUM($F2,1)<=WEEKNUM(--$B$2:$B$19,1)),--($C$2:$C$19="x"))
What am I missing?
Dave
@Dave,
I am sure your results are a correct interpretation but as an aside, I am wondering how meaningful the final table is:
Take 12 Jan-1 Feb: do we need "x" for each week that falls within this period? the whole period? and what does the result of 3 for week 8 Jan mean?How many x's will I need the week of Jan 8? and so on...
Perhaps more coffee is required ......!
January 12 falls within the week of January 8th...therefore I know the week of Jan 8 I will require an x. In real life, the "x" are employees and the start and end dates are assignment dates. I am trying to manage resources on a weekly basis, based on start and end dates of assignments.
My "desired solution" was incorrect. Your formula seems to work! Thank you
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks