Flag Backorder Shipments

LVExcel

Board Regular
Joined
Nov 23, 2011
Messages
59
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone, I'm trying to get a cleaner formula to label any records shipped as backorder.

Here's my formula, but know there has to be something cleaner.

Excel Formula:
=IF(AND(B2=B1,C2<>C1),"Backorder",IF(AND(A1="Backorder",B2=B1,C2=C1),A1,"Regular"))

Formula: if Order# is the same as previous Order#, and ShipDate is not the same as previous ShipDate, then it's a Backorder. Also, if previous record was labeled "Backorder", and Order# is the same as previous Order#, and ShipDate is the same as previous ShipDate, then label it as previous record, "Backorder", if not label record as "Regular".

Of course, I first have to sort by Primary: Order#, Secondary: ShipDate

BackorderOrder #Ship Date
Regular1281418419/21/2017
Regular1281418419/21/2017
Regular1281418419/21/2017
Regular1281424101/10/2017
Backorder1281424103/1/2017
Backorder1281424108/31/2017
Regular1281428311/10/2017
Backorder1281428318/31/2017
Regular1281432231/10/2017
Backorder1281432238/31/2017
Regular1281432861/10/2017
Backorder1281432868/31/2017
Regular1281434781/10/2017
Backorder1281434788/31/2017
Regular1281436741/17/2017
Regular1281437701/10/2017
Backorder1281437708/31/2017

Thanks, I would appreciate any help you can provide.
 
Last edited by a moderator:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You can try something like this also:
Book1
ABC
1BackorderOrder #Ship Date
2Regular1281418419/21/17
3Regular1281418419/21/17
4Regular1281418419/21/17
5Regular1281424101/10/17
6Backorder1281424103/1/17
7Backorder1281424108/31/17
8Regular1281428311/10/17
9Backorder1281428318/31/17
10Regular1281432231/10/17
11Backorder1281432238/31/17
12Regular1281432861/10/17
13Backorder1281432868/31/17
14Regular1281434781/10/17
15Backorder1281434788/31/17
16Regular1281436741/17/17
17Regular1281437701/10/17
18Backorder1281437708/31/17
Sheet9
Cell Formulas
RangeFormula
A2:A18A2=IF(MIN(IF($B$2:$B$18=B2,$C$2:$C$18))=C2,"Regular","Backorder")
Press CTRL+SHIFT+ENTER to enter array formulas.

There's a minifs function on newer Excel versions (2016 - ?)
 
Last edited by a moderator:
Upvote 0
Solution
Thanks a lot Sheetspread, works great and much more professional. I appreciate it.

You can try something like this also:

Book1
ABC
1BackorderOrder #Ship Date
2Regular1281418419/21/17
3Regular1281418419/21/17
4Regular1281418419/21/17
5Regular1281424101/10/17
6Backorder1281424103/1/17
7Backorder1281424108/31/17
8Regular1281428311/10/17
9Backorder1281428318/31/17
10Regular1281432231/10/17
11Backorder1281432238/31/17
12Regular1281432861/10/17
13Backorder1281432868/31/17
14Regular1281434781/10/17
15Backorder1281434788/31/17
16Regular1281436741/17/17
17Regular1281437701/10/17
18Backorder1281437708/31/17
Sheet9
Cell Formulas
RangeFormula
A2:A18A2=IF(MIN(IF($B$2:$B$18=B2,$C$2:$C$18))=C2,"Regular","Backorder")
Press CTRL+SHIFT+ENTER to enter array formulas.

There's a minifs function on newer Excel versions (2016 - ?)
 
Last edited by a moderator:
Upvote 0
Hi Sheetspread, just to get this right, with your formula I wont need to Sort my data by ShipDate first, since it's looking for the Min Date to label as "Regular"?
 
Upvote 0
The array formula still worked after randomly sorting your data:

Book1
ABCDEF
1BackorderOrder #Ship Datesort
2Regular1281428311/10/170.0425674RegularRegular
3Backorder1281428318/31/170.057551BackorderBackorder
4Backorder1281437708/31/170.1382673RegularBackorder
5Regular1281418419/21/170.2513477RegularRegular
6Backorder1281432238/31/170.2615502RegularBackorder
7Backorder1281432868/31/170.2793757RegularBackorder
8Regular1281432231/10/170.3141159RegularRegular
9Backorder1281424108/31/170.5895387RegularBackorder
10Regular1281432861/10/170.5990073RegularRegular
11Regular1281436741/17/170.603248RegularRegular
12Regular1281418419/21/170.648918RegularRegular
13Backorder1281434788/31/170.8076012RegularBackorder
14Regular1281418419/21/170.8228764RegularRegular
15Regular1281434781/10/170.8554872RegularRegular
16Regular1281424101/10/170.8933647RegularRegular
17Regular1281437701/10/170.9037478RegularRegular
18Backorder1281424103/1/170.9334438RegularBackorder
Sheet9 (2)
Cell Formulas
RangeFormula
E2:E18E2=IF(AND(B2=B1,C2<>C1),"Backorder",IF(AND(A1="Backorder",B2=B1,C2=C1),A1,"Regular"))
F2:F18F2=IF(MIN(IF($B$2:$B$18=B2,$C$2:$C$18))=C2,"Regular","Backorder")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
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