I'm having issues trying to get an array formula to work properly.
Simplified explanation: I'm working with a sheet of data (Orders) for work orders, with columns for workorder number, description, charge type, amount, etc. There can be multiple entries (charges) for a single workorder, for example charge type of "Parts" on one row, "Labor" on another row, "Refund" on another row, etc. There could also be several rows (for the same workorder) that are all for "Parts". On a separate Summary sheet, I need to sum, for each workorder, total parts, total labor, etc.
This would be simple, EXCEPT for that fact that sometimes the workorder number is MISSING from its column in the Orders sheet. But fortunately, the description field usually contains the workorder number (interspersed with other text). My client therefore wants me to also sum (for example) the total costs for "Parts" where the workorder column is blank, but the target workorder number (123456, for example) appears anywhere in the description.
There is a range name (such as Orders_Amounts) assigned to each column in the Orders data sheet. For starters, I wrote an array formula to simply sum ALL the amounts where the target workorder number (in cell A2 of my Summary sheet) appears anywhere in the description:
This does indeed give me a correct total. However, I then tried to limit the sum to only include "Parts":
This now simply gives me a ZERO result (although I've confirmed that every single row with the target workorder number does indeed show "Parts" under charge type).
Each of the named ranges is for a complete column, so the rows of each are equal. What am I doing wrong?
Bookmarks