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
 

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