Originally Posted by
etaf
you can add this to a new sheet 2 cell A2
=INDEX(Sheet1!$A$3:$A$400, MATCH(0, COUNTIF($A1:A$1, Sheet1!$A$3:$A$400), 0))
and use Shift+control+enter to make an array formula and get {} around the formula
that will extract a unique value from the invoice numbers
then in B2 put
=COUNTIFS(Sheet1!$A$3:$A$400,Sheet2!A2,Sheet1!$E$3:$E$400,"<>Standard postage",Sheet1!$E$3:$E$400,"<>",Sheet1!$E$3:$E$400, "<>NEXT WORKING DAY - Order <2pm")
this will count the items for each invoice number and exclude - blank lines, standard postage and next working day
BUT i dont know how many line items you have that you want excluded - see attached
unless theres a column thats i can use thats identifies the items you want to count
i notice you have a category column that is showing postage (includes standard .... and next working....) - is that applicable to all other types you dont want to include - we could use that to simplify
=COUNTIFS(Sheet1!$A$3:$A$400,Sheet2!A2,Sheet1!$C$3:$C$400,"<>postage",Sheet1!$E$3:$E$400,"<>")
Bookmarks