find first occurrence in a column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to be able to specify a vector within a column, and then starting
at any location within that vector, find the first occurrence of a specific
value, starting at that location and searching upward. For example, I'd like
to create a function that would look like: FOOBAR("x", c10:c$2). Then if
the vector were actually
("","","y","","x","","","","x") FOOBAR should return a value of 4. (First
element is indexed "0". Thanks much for any help!

Trainrider
 
Trainrider said:
I'd like to be able to specify a vector within a column, and then starting
at any location within that vector, find the first occurrence of a specific
value, starting at that location and searching upward. For example, I'd like
to create a function that would look like: FOOBAR("x", c10:c$2). Then if
the vector were actually
("","","y","","x","","","","x") FOOBAR should return a value of 4. (First
element is indexed "0". Thanks much for any help!

Trainrider
 
You may find more help in an Excel group, as c10:c$2 is not a valid
descriptor of a data range in Access.
While column data in Excel has an intrinsic order, in Access it doesn't. So
in Access you'd have to include some indexing somewhere to assure that
you're looking at the sort order you want.

Please post back if this is really something you need to do in Access,
not Excel.

HTH
- Turtle
 
Back
Top