Array Count when selecting a value from a cell.

LUIS FREUND
LUIS FREUND used Ask the Experts™
on
On the attached excel file I ahve this tab called "PN DUE BY WK"  on cell C7 you select the week and then it populates the associated week number with it's relevant data from the "FORECAST" tab.

The problem is that it brings in data that does not pertain to that week becuase it has association to cell C7.  How can I  just bring in just only week 1 when selected and not the other data.  See attachment.

For example...when I select week 1 it brings in extra data that does not pertain to week 1.
C--Users-lfreund-Documents-EE-Count.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:
Hi Luis,

Please find the attached with the tweaked formulas and let me know if you are getting the desired output now.
C--Users-lfreund-Documents-EE-COUNT.xlsx
byundtMechanical Engineer
Most Valuable Expert 2013
Top Expert 2013
Commented:
You may use a single formula copied across and down:
=IFERROR(INDEX(FORECAST!$B$2:$N$320,AGGREGATE(15,6,ROW(FORECAST!$B$2:$B$320)/(FORECAST!$B$2:$C$320=$C$7),ROWS($B$10:$B10))-1,CHOOSE(COLUMNS($B10:B10),1,9,3,4,5,6,7,11,8,13,12)),"")

Open in new window


It wasn't clear to me whether FORECAST column B or C should be searched for the value in cell C7. The above formula responds to a match with either.
C--Users-lfreund-Documents-EE-Count.xlsx

Author

Commented:
Thank you both!  This helped me out tremendously!   Happy New Year to both of you!
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

Commented:
You're welcome Luis!
Happy New Year to you too!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial