Spreadsheet: 288879d1389331559-return-the-max-value-considering-criteria-in-multiple-columns-example
Sheet: Sheet1

 |  |  |  |  |  |  |  |  |  |  | Send To |  |  |  | Send From
 |  |  |  |  |  |  |  |  |  | Sales > | SOH < | W OH < |  | Sales < | SOH > | W OH >
 |  |  |  |  |  |  |  |  |  | 0 | 4 | 6.1 |  | 2 | 0 | 6
 |  |  |  |  | Values |  |  |  |  | Quantities
Style Code | State | Location Code | Location Name | Desc | [NAME] | Current OH | Last X Weeks Sales | Sum of W OH | State | Required | Available | Send To | Units Still Required | New OH Units | Difference | Style Code
[PHONE] | NSW | 0009 | [NAME] | FARAH SHORT BOOT BLACK | 4 | 1 | 0
 |  | 0021 | GP Chatswood | FARAH SHORT BOOT BLACK | 4 | 5 | 0
 |  | 0032 | GP [NAME] | FARAH SHORT BOOT BLACK | 4 | 0 | 0
 |  | 0034 | GP [NAME] | FARAH SHORT BOOT BLACK | 5 | 0 | 1 | 0
 |  | 0039 | GP Burwood | FARAH SHORT BOOT BLACK | 5 | 4 | 0
 |  | 0040 | [NAME] | FARAH SHORT BOOT BLACK | 4 | 3 | 0
 |  | 0043 | GP Erina | FARAH SHORT BOOT BLACK | 6 | 0 | 1 | 0
 |  | 0045 | GP [NAME] | FARAH SHORT BOOT BLACK | 8 | 0 | 1 | 0
 |  | 0049 | [NAME] | FARAH SHORT BOOT BLACK | 5 | 2 | 2 | 4
 |  | 0058 | GP [NAME] | FARAH SHORT BOOT BLACK | 4 | 0 | 4 | 0
 |  | 0063 | GP Glenmore Rd | FARAH SHORT BOOT BLACK | 4 | 1 | 1 | 4
 |  | 0064 | GP Broadway | FARAH SHORT BOOT BLACK | 4 | 3 | 0
 |  | 0066 | GP [NAME] | FARAH SHORT BOOT BLACK | 6 | 3 | 1 | 12
 |  | 0071 | GP Fountain Gate | FARAH SHORT BOOT BLACK | 5 | 2 | 0
 |  | 0072 | [NAME] | FARAH SHORT BOOT BLACK | 4 | 1 | 1 | 4
 | QLD | 0041 | GP Chermside | FARAH SHORT BOOT BLACK | 6 | 4 | 0 |  |  |  |  | GP [NAME]
 |  | 0055 | GP [NAME] | FARAH SHORT BOOT BLACK | 8 | 3 | 3 | 4
 |  | 0075 | GP Carindale | FARAH SHORT BOOT BLACK | 4 | 2 | 1 | 8
 | VIC | 0014 | GP Chapel Street | FARAH SHORT BOOT BLACK | 6 | 2 | 0 |  |  |  |  | GP [NAME]
 |  | 0038 | GP Chadstone | FARAH SHORT BOOT BLACK | 6 | 2 | 3 | 2.666666666666667
 |  | 0046 | GP Knox City | FARAH SHORT BOOT BLACK | 4 | 1 | 3 | 1.333333333333333
 |  | 0050 | GP [NAME] | FARAH SHORT BOOT BLACK | 6 | 0 | 3 | 0
 |  | 0062 | GP Eastlands | FARAH SHORT BOOT BLACK | 4 | 1 | 2 | 2
 | WA | 0069 | GP Garden City | FARAH SHORT BOOT BLACK | 5 | 1 | 1 | 4
 |  | 0076 | GP Karrinyup | FARAH SHORT BOOT BLACK | 6 | 2 | 2 | 4
[PHONE] | NSW | 0009 | [NAME] | GALAXY DIGI BEACHSHORT | 1 | 0 | 0
 |  | 0021 | GP Chatswood | GALAXY DIGI BEACHSHORT | 4 | 1 | 4 | 1
 |  | 0032 | GP [NAME] | GALAXY DIGI BEACHSHORT | 4 | 1 | 2 | 2
 |  | 0034 | GP [NAME] | GALAXY DIGI BEACHSHORT | 7 | 2 | 1 | 8
 |  | 0039 | GP Burwood | GALAXY DIGI BEACHSHORT | 4 | 6 | 1 | 24
 |  | 0040 | [NAME] | GALAXY DIGI BEACHSHORT | 3 | 1 | 1 | 4
 |  | 0043 | GP Erina | GALAXY DIGI BEACHSHORT | 4 | 0 | 1 | 0
 |  | 0045 | GP [NAME] | GALAXY DIGI BEACHSHORT | 7 | 1 | 4 | 1
 |  | 0049 | [NAME] | GALAXY DIGI BEACHSHORT | 7 | 1 | 6 | 0.6666666666666666
 |  | 0058 | GP [NAME] | GALAXY DIGI BEACHSHORT | 3 | 1 | 0
 |  | 0064 | GP Broadway | GALAXY DIGI BEACHSHORT | 4 | 0 | 0
 |  | 0072 | [NAME] | GALAXY DIGI BEACHSHORT | 5 | 2 | 1 | 8
 | QLD | 0041 | GP Chermside | GALAXY DIGI BEACHSHORT | 5 | 2 | 2 | 4
 |  | 0055 | GP [NAME] | GALAXY DIGI BEACHSHORT | 8 | 3 | 1 | 12
 |  | 0075 | GP Carindale | GALAXY DIGI BEACHSHORT | 4 | 2 | 0
 | VIC | 0038 | GP Chadstone | GALAXY DIGI BEACHSHORT | 4 | 1 | 1 | 4
 |  | 0046 | GP Knox City | GALAXY DIGI BEACHSHORT | 3 | 2 | 0
 |  | 0050 | GP [NAME] | GALAXY DIGI BEACHSHORT | 6 | 1 | 2 | 2
 |  | 0062 | GP Eastlands | GALAXY DIGI BEACHSHORT | 3 | 1 | 1 | 4
 | WA | 0069 | GP Garden City | GALAXY DIGI BEACHSHORT | 4 | 1 | 1 | 4
 |  | 0076 | GP Karrinyup | GALAXY DIGI BEACHSHORT | 4 | 0 | 3 | 0
Grand Total |  |  |  |  | 221 | 72 | 62 | 4.645161290322581