Find the earliest order that was open each week

TwinJohnson

New Member
Joined
Jul 15, 2021
Messages
11
Office Version
  1. 365
  2. 2011
Platform
  1. Windows
I need to get a snapshot to find the earliest order date that was still open for each week.

First I assigned the week ending that coorelates with the order date then I located the earliest order date by manually reviewing each week if the order was still open or not and if not then I pulled the earliest order date open that week. (column BI-TB)

For example on Week Ending Date 01/05/2019 the earliest order # that was not closed prior to 01/05/2019 is either order 72787152, 72774457, 72774465, 772776825 or 77276833. Each of these orders had an order date of 01/02/2019 therefore the earliest order open during that time was 01/02/2019. These orders didn't close until March.

The next week is week ending 01/12/2019, the earliest order # that was not closed prior to 01/12/2019 is the same orders from above AND 72793176, 72793192,72793168 etc. (see column BE where week ending date = 01/12/2019). The earliest order still open during this period and prior is still 01/02/2019.

The earliest order still open doesn't change until week ending 01/26 in which order 72827594 is still open when recorded.

What is the best way to figure this out in Excel? I tried =IF(ISNUMBER(CLOSED DATE),MAX(IF(ORDER # COLUMN =ORDER # CELL A2,ORDER DATE WEEK ENDING)), 99/99/9999") but that returns the order date week ending and not the actual order date.

Thank you,
Tawnee
 

Attachments

  • Capture.PNG
    Capture.PNG
    73.6 KB · Views: 17

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I need to get a snapshot to find the earliest order date that was still open for each week.

First I assigned the week ending that coorelates with the order date then I located the earliest order date by manually reviewing each week if the order was still open or not and if not then I pulled the earliest order date open that week. (column BI-TB)

For example on Week Ending Date 01/05/2019 the earliest order # that was not closed prior to 01/05/2019 is either order 72787152, 72774457, 72774465, 772776825 or 77276833. Each of these orders had an order date of 01/02/2019 therefore the earliest order open during that time was 01/02/2019. These orders didn't close until March.

The next week is week ending 01/12/2019, the earliest order # that was not closed prior to 01/12/2019 is the same orders from above AND 72793176, 72793192,72793168 etc. (see column BE where week ending date = 01/12/2019). The earliest order still open during this period and prior is still 01/02/2019.

The earliest order still open doesn't change until week ending 01/26 in which order 72827594 is still open when recorded.

What is the best way to figure this out in Excel? I tried =IF(ISNUMBER(CLOSED DATE),MAX(IF(ORDER # COLUMN =ORDER # CELL A2,ORDER DATE WEEK ENDING)), 99/99/9999") but that returns the order date week ending and not the actual order date.

Thank you,
Tawnee
Can you please post a decent amount of data using XL2BB that members can use when working out a formula?
 
Upvote 0
RAW TableResultsOn week ending:01/05 order was open?On 01/12 order was open?On 01/19 order was open?On 01/26 order was open?On 02/02 order was open?On 02/09 order was open?On 02/16 order was open?On 02/23 order was open?On 03/02 order was open?On 03/09 order was open?On 03/16 order was open?On 03/23 order was open?
Order #Order DateClosed DateDate Table Week Ending DateResults = Earliest Order Date
7278715201/02/1903/06/191/5/20191/2/2019YYYYYYYYYNNN
7277445701/02/1903/21/191/5/20191/2/2019YYYYYYYYYYYN
7277446501/02/1903/21/191/5/20191/2/2019YYYYYYYYYYYN
7277682501/02/1903/21/191/5/20191/2/2019YYYYYYYYYYYN
7277683301/02/1903/21/191/5/20191/2/2019YYYYYYYYYYYN
7279317601/06/1903/10/191/12/20191/2/2019YYYYYYYYYYNN
7279319201/06/1903/21/191/12/20191/2/2019YYYYYYYYYYYN
7279316801/07/1903/21/191/12/20191/2/2019YYYYYYYYYYYN
7279696301/08/1903/08/191/12/20191/2/2019YYYYYYYYYNNN
7280549101/14/1903/12/191/19/20191/2/2019YYYYYYYYYYNN
7280070801/14/1903/13/191/19/20191/2/2019YYYYYYYYYYNN
7280454401/14/1903/13/191/19/20191/2/2019YYYYYYYYYYNN
7280526901/14/1903/13/191/19/20191/2/2019YYYYYYYYYYNN
7280255501/15/1903/13/191/19/20191/2/2019YYYYYYYYYYNN
7280905501/15/1903/13/191/19/20191/2/2019YYYYYYYYYYNN
7280861001/16/1903/13/191/19/20191/2/2019YYYYYYYYYYNN
7280901401/16/1903/14/191/19/20191/2/2019YYYYYYYYYYNN
7281034301/16/1903/14/191/19/20191/2/2019YYYYYYYYYYNN
7281689401/20/1903/18/191/26/20191/2/2019YYYYYYYYYYYN
7281963301/20/1903/18/191/26/20191/2/2019YYYYYYYYYYYN
7281962501/21/1903/20/191/26/20191/2/2019YYYYYYYYYYYN
7281946801/23/1903/22/191/26/20191/2/2019YYYYYYYYYYYN
7281948401/23/1903/22/191/26/20191/2/2019YYYYYYYYYYYN
7282223101/23/1903/22/191/26/20191/2/2019YYYYYYYYYYYN
7282225601/23/1903/22/191/26/20191/2/2019YYYYYYYYYYYN
7282759401/24/1903/28/191/26/20191/24/2023YYYYYYYYYYYY
7282208201/25/1903/22/191/26/20191/24/2023YYYYYYYYYYYN
 
Upvote 0
@TwinJohnson please do not include multiple quotes of the same thing in your posts. I have removed them this time. Thanks
 
Upvote 0
Can you please post a decent amount of data using XL2BB that members can use when working out a formula?
Thank you Herakles, I just learned about XL2BB for this forum and hope that I uploaded this correctly.
Regards,
Tawnee
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top