Okay, I made the following changes:
1. Changed the heading in WHSL-RETAIL-DATA-ALL column A to
MANUAL PICKED, (removed the LineFeed)
2. Named the range in that column to
MANUAL_PICKED. I have no idea why you have all those empty rows??? That is not a best and accepted practice.
3. Named the $B$2 cell,
SelectedYear.
3a. Named C2 cell
SelectedType containing WHSL
3b. Entered RED, BLUE, WHITE in ROW 1 in all five columns in each group.
3c. Changed the heading from
2015 AVG DAYS to
2015 AVG AGE
4. Changed the formula in D4 to
[tt]
=SUMPRODUCT((IF($C4="MISC",MANUAL_PICKED="X",MAKE=$C4))*(YEARSOLD=SelectedYear)*(STORE=E$1)*(SALETYPE=SelectedType)*1)
[/tt]
...and entered it as an ARRAY FORMULA (ctrl+SHIFT+ENTER)
5. Changed the formula in E4 to
[tt]
=IF(ISERROR(SUMPRODUCT((STORE=E$1)*(IF($C4="MISC",MANUAL_PICKED="X",MAKE=$C4))*(YEARSOLD=SelectedYear)*(SALETYPE=SelectedType)*INDIRECT(MID(E$3,10,LEN(E$3)-9))/$D4))," - ",SUMPRODUCT((IF($C4="MISC",MANUAL_PICKED="X",MAKE=$C4))*(YEARSOLD=SelectedYear)*(STORE=E$1)*(SALETYPE=SelectedType)*INDIRECT(MID(E$3,10,LEN(E$3)-9))/$D4))
[/tt]
...and entered it as an ARRAY FORMULA (ctrl+SHIFT+ENTER).
This means that you need only TWO formulas to do the job without making more modification. See the [highlight #FCE94F]YELLOW highlight[/highlight] in the uploaded workbook (3 row examples)
General Comment:
You have made this application much harder to maintain that it need to be.
1. ALL table headings ought to be in ONE ROW.
2. All Table headings ought to be unique.
3. Use the Create Names in TOP row feature to create all range names in one operation. It would be better to use a macro to do this.
4. All formulas, such as the one here modified, ought NOT to contain literal values if at all possible. This would enable you to copy the formula DOWN and ACROSS.
5. When referencing lookup ranges, such as Cost, Recon, Gross, Age, (as in WHSL-RETAIL-DATA-ALL), from a table as in WHSL-UNITS BY MAKE, the heading data, Cost, Recon, Gross, Age, ought to correspond EXACTLY, in order to enable a single formula to be used. The INDIRECT() function makes this possible. I used the MID() function to get this data from existing headings. You could add rows above/hidden to contain such data as a row for Store (RED, BLUE, WHITE) and a row for Cost, Recon, Gross & Age to eliminate using the MID() function and keep AVG DAYS. This would eleminate the need for literals in your formulas.
Skip,
Just traded in my OLD subtlety...
for a NUance!![[tongue] [tongue] [tongue]](/data/assets/smilies/tongue.gif)