• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to count position of last column number in a range

naina

New Member
Hello there-attached is my spreadsheet with the values in column C2 to I8. My objective is to count the number of month on hand inventory at any given month. Objective is inA9 and desired result is in Line #10.
Can anyone please help!
Thanks in advance
Best regards
Naina S
 

Attachments

  • QUESTION.xlsx
    11 KB · Views: 12
Please try at C10

=SUMPRODUCT(--(MMULT(COLUMN($C$1:INDEX($C$1:$I$1,COLUMNS($C10:C10)))^0,N(+C2:INDEX($I$2:$I$8,COLUMNS($C10:C10))))>0))
 

Attachments

  • QUESTION.xlsx
    12.2 KB · Views: 12
Thanks a lot. This worked like a charm. I would have never thought of using MMULT and index. You are a genius.
Best regards
Naina
 
Thanks a lot. This worked like a charm. I would have never thought of using MMULT and index. You are a genius.
Best regards
Naina
 
Back
Top