I have thirty days worth of customer demand for parts. I would like excel to find the greatest sum during any 7 day period and give me that value in a cell at the end of a row of data that includes blank cells and date gaps.
I have thirty days worth of customer demand for parts. I would like excel to find the greatest sum during any 7 day period and give me that value in a cell at the end of a row of data that includes blank cells and date gaps.
Last edited by Sebastion; 05-18-2011 at 09:48 PM.
Why make life hard?
See Sheet2
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
This works but I have thousands of rows of data and I would like to keep it to a formula in one column. I have taken your advice but I believe there may be an easier way by using an array and the sumproducts and/or offset functions. Please review my attachement. You got me half way there. I just need a bit more.
I can't say I'm bouncing up and down with joy at the prospect of finding a SUMPRODUCT() solution to this problem.
Try this workbook Sheet3
This uses only one helper column and two dynamic named ranges.
1/. Select a product from the drop-down in B2 to get the results for each product.
2/. Drag down the dates in Column C. (Note the header changes)
Now add some figures to the column related to the selected part, the data will update in B4 & B6.
3/. Drag the header in Row 2 right, or add new part names/numbers in G2 to whatever , check the change in the drop-down B2.
Now select one of the new options in B2 and add some figures to the matching column.
This has a trade-off, only one part can be displayed at a time, if you want to compare two or three parts it's no big deal to add more helpers and drop-downs.
If you need to see all the data for all parts at once we are probably talking VBa, possibly as UDFs, let me know and I'll give it a go if necessary.
This will almost definitly be easier than a SUMPRODUCT()/COUNTIFS() solution.
A sample of your actual workbook would be an advantage, perhaps for producing a VBa conversion, or a formula based results sheet.
Let me know what you think.
Last edited by Marcol; 05-16-2011 at 09:09 AM. Reason: Typo - I dropped the O in COUNTIFS and the forum didn't over-write it with **** !
I have attached my actual data. The dates across the top are in Julian Date format YDDD. I would like to replace the grand total in the far right column with a formula that will compute the largest quantity ordered in a seven day period so I can ensure I have enough stock on the shelf to support a 7 day replenishment delivery time. Please try to give me a formula that I can put into a cell and replicate to the last record and avoid using VB if at all possible. I really appreciate your help.
Well, it took me a while, but I think I may have something you can use...
Using your posted workbook...
1) I couldn't get my formulas to work with your Julian dates, so I converted them to Excel dates in Row_1.
2) Since there are gaps in the dates, but the dates are in ascending order, I'm assuming you want to find totals for 7 consecutive dates...not necessarily consecutive cells.
Example: Jan-01, Jan-12
Find the total for Jan-01 through Jan-07
If that's true, this ARRAY-FORMULA, completed by pressing CTRL+SHIFT+ENTER (instead of just ENTER) returns the maximum total for any seven consecutive days.
Please Login or Register to view this content.
Copy that formula and paste into FD4:FD936
I've attached an edited version of your workbook with those changes.
Is that something you can work with?
This is exactly what I was looking for. I just wish I could understand it. What would you call this function? I looked all over the web and couldn't find anything on this. To me it seems like something warehouse managers would be very interested in.
1) I have no idea what to call it
2) I've never seen any other formula do the same thing
3) It took me quite a while to figure out how to build it
4) Just because I, or anybody else for that matter, "invented" a formula...doesn't mean it hasn't been done countless other times, but nobody knows about it.
...That's why I never call a formula "my formula" or "your formula" and I never give or take credit for any formula.
Perhaps...some people might say they saw it here first.
Regardless, I wish I had half of your skills. Thank you very much for the help.
Last edited by Sebastion; 05-18-2011 at 09:52 PM.
Neat one Ron!
I was still plugging away with my "expanded" worksheets, then the Julian dates appeared, they in short form at least, I find quite ambiguous.
I simply don't know the variations and conventions for their use/interpretation.
Several well respected people offer solutions for converting MJD to Gregorian and even they can give conflicting results, albeit slight, but to me any variation makes the whole proposition a bit dubious.
Must take some time to try understanding this date system.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks