I am pulling data from MS SQL and I have a few columns that I have to take logic into place in order to get an "add" quantity in a separate column for certain "item code" values. This is my logic that gets the counts, the two columns I need to total are K & L, udf_Qty received- always count if > 0
udf_Qty pulled - count if (allocated = Y and date allocated <> today) or processed incomplete = Y
The goal is to just get a total to display just once, so I am not sure if thats possible or if I would have to add a column to get the count of each row first then add a column after that to get the total? I attached a sample copy of file . The last column labeled "add" would what I want my results to be and displayed like this. Would a pivot work for this?
udf_Qty pulled - count if (allocated = Y and date allocated <> today) or processed incomplete = Y
The goal is to just get a total to display just once, so I am not sure if thats possible or if I would have to add a column to get the count of each row first then add a column after that to get the total? I attached a sample copy of file . The last column labeled "add" would what I want my results to be and displayed like this. Would a pivot work for this?
TEST.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | SalesOrderNo | ItemCode | QuantityOrdered | QuantityBackordered | UDF_QTY_PULLED | UDF_QTY_RECEIVED | UDF_PROCESSED_IC | UDF_PROCESS_INCOMPLETE | UDF_ALLOCATED | WarehouseCode | DATE ALLOCATED | add | ||
2 | 8304444 | 10022328-BEIGE/KHAKI-LGR | 5 | 0 | 5 | 0 | N | N | Y | 000 | ||||
3 | 8307056 | 10022328-BEIGE/KHAKI-LGR | 3 | 0 | 3 | 0 | N | N | N | 000 | ||||
4 | 8309702 | 10022328-BEIGE/KHAKI-LGR | 5 | 0 | 5 | 0 | N | N | Y | 000 | 10 | |||
5 | 8245405 | 10022328-BEIGE/KHAKI-MEDR | 2 | 0 | 2 | 0 | N | Y | 000 | |||||
6 | 8309710 | 10022328-BEIGE/KHAKI-MEDR | 3 | 0 | 3 | 0 | N | N | N | 000 | 2 | |||
7 | 8267639 | 10022328-BEIGE/KHAKI-SMLR | 2 | 0 | 2 | 0 | N | N | N | 000 | 6/16/2023 | |||
8 | 8291578 | 10022328-BEIGE/KHAKI-SMLR | 2 | 1 | 1 | 1 | N | N | Y | 000 | 2 | |||
9 | 8287281 | 10022328-BEIGE/KHAKI-XLR | 5 | 0 | 5 | 0 | N | N | N | 000 | ||||
10 | 8300303 | 10022328-BEIGE/KHAKI-XLR | 1 | 1 | 0 | 1 | N | N | N | 000 | ||||
11 | 8307479 | 10022328-BEIGE/KHAKI-XLR | 1 | 0 | 1 | 0 | N | N | Y | 000 | ||||
12 | 8310457 | 10022328-BEIGE/KHAKI-XLR | 5 | 0 | 5 | 0 | N | N | Y | 000 | 7 | |||
13 | 8245405 | 10022328-BEIGE/KHAKI-XXLR | 5 | 0 | 5 | 0 | N | N | Y | 000 | ||||
14 | 8309990 | 10022328-BEIGE/KHAKI-XXLR | 4 | 0 | 4 | 0 | N | N | N | 000 | 5 | |||
15 | 8298394 | 10022328-BEIGE/KHAKI-XXLTR | 3 | 0 | 3 | 0 | Y | N | N | 000 | 3 | |||
Sheet1 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
G4 | Cell Value | duplicates | text | NO |