Formula Help

  • Thread starter Thread starter Grant
  • Start date Start date
G

Grant

I have a sheet that lists items and sales for each month for the last 24
months.
Example

Description, Oct04, Nov04,....Aug,06,Sep06
Item001, 1, 0,.....,0,0
Item002,
Item003

I need a formula to determine the last month the sales number was positive.
For Item001 the result would be Oct04.

Grant
 
One way ..

Assuming the 24 date col headers are in B1:Y1, data from row2 down

Put in Z2, array-enter the formula by pressing CTRL+SHIFT+ENTER
(instead of just pressing ENTER):

=IF(SUM(B2:Y2)=0,"",INDEX($B$1:$Y$1,MATCH(MAX((B2:Y2>0)*COLUMN(B2:Y2)),(B2:Y2>0)*COLUMN(B2:Y2),0)))

Copy Z2 down to return the required results ..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top