Finding the first instance of a cell value

C

c

Hi,

I am trying to come up with a formula to display the number of days since a
cell value occurred.

Each row represents a daily data entry from machine output readings.

My data looks like:

green red orange purple black
yellow red blue brown orange
blue green brown pink yellow
etc.

What I need to get is the number of days since a color has occurred. The
most recent days are at the top, so if my formula searched for black, it
would return the value 1 because black is in the first row. If I searched
for brown it would return the value 2 because the first instance of brown is
in the second row.

Any help is appreciated.
Thanks
Chris
 
D

Daniel.M

Hi,

To Find for "Orange" in Rng, the following Array formula (Ctrl-Shift-Enter):

=MATCH(1,MMULT(--(Rng="Orange"),TRANSPOSE(COLUMN(Rng))*0+1),0)

Regards,

Daniel M.
 

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

Top