Help with FORMULA

chrysti

Board Regular
Joined
Dec 20, 2006
Messages
218
I hope that someone can help me!!! I am trying to figure out how to write a formula, and I don't even know where to begin!!!

I have a list of colors and the weeks that they started selling in
wk1 wk2 wk3 wk4 wk5 wk6 wk7 wk8 wk8 wk9 wk10
Clr 1 0 1 1 1 1 2 3 2 1 1 0
Clr 2 0 0 2 3 3 2 2 1 0 0 0
Clr 3 0 0 0 1 2 1 2 0 0 0 0
Clr 4 0 0 0 0 1 2 1 1 1 1 1
Clr 5 0 1 2 3 1 2 1 1 1 0 0

I want to know what week each color started to sell, and then how many weeks after that there were sales, I need it to tell me that Clr 1 started selling wk2 and lived for 9 weeks so that I know when it stopped selling...arghhhh!!!

Please help!!! There is also the possibility that we may look at more weeks, as many as the full year so 52 weeks!!!

Thanks in advance to anyone who can help me out!!!
Chrysti
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
What is the definition of stopped selling, the week before the first week there were no sales (first zero after the first week) or the last week that there were sales in the entire row (last cell with non-zero data?)?
 
Upvote 0
Zero before are when the color was not available, and the zeros after are when the colors were sold out or stopped selling. :) I hope that this clears that up.
 
Upvote 0
And where do you want the summary of this data for each color? Or do you just want the first week one color and the last week another color?
 
Upvote 0
Couldn't you use:

=COUNTIF(B1:L1,"<> 0")

In M1 and copy down? (adjust ranges as necessary). That shuold get you the # of weeks it sold.
 
Upvote 0
I can get the count part, that is the least of my worries, it is how to find the first week that I am having the most trouble with :( Any ideas on how to find that out in a range that could be as large as 52 weeks???
 
Upvote 0
This seemed to work for me. Adjust ranges as needed

=OFFSET(INDEX(A2:G2,MATCH(1,A2:G2,0)),-1,0)
 
Upvote 0
Here is the whole shabang:
Book1
ABCDEFGHIJK
1wk1wk2wk3wk4wk5wk6wk7
2Color10111000wk23
3Color20011111wk35
4Color31111111wk17
5Color40001111wk44
Sheet1


Hmm, seems to only work if 1 (or whatever you want it to be) is sold. Maybe someone who is less of a hack will come by and save the day
 
Last edited:
Upvote 0
Very cool. I haven't invested the time to fully understand Offset yet. SOmeday I will have to read through the posts that I've bookmarked on the subject :-)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top