View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Finding values between values.

Let's do this in steps

=MATCH(A1,B1:B10,1)

A1 is the value that you want to match
B1:B10 is the range that you are searching in
1 indicates the match type.

If match_type is 1, MATCH finds the largest value that is less than or equal
to lookup_value. Lookup_array must be placed in ascending order: ...-2, -1,
0, 1, 2, ..., A-Z, FALSE, TRUE.

OK, got that so far?

Now let's look at INDEX
=INDEX(A1:D10,F4,1)

A1:D10 is the range that you are searching in. Think of this in the same
sense as the range for the VLOOKUP.

F4 would be replaced with your MATCH function to get the ROW Number. You
may need to add some #'s to this if your match function didn't start at row 1.

1 would be replaced with your column number.

Clear as mud?

Barb Reinhardt

"Gareth - Network analyst." wrote:

Hi Barb

maybe I'm not thinking straight but my match dont wanna wok on its own never
mind getting the whole formula.

OH here what I am doing exactly, I have a sheet with shifts layed out in the
format i said mondays Date with the guys working to the right of it and above
all of this is a Letter for the shift (A,B,C,D,etc) i have created a sheet
now that has the current date on i want it to take a Name in cell D3 and look
it up returning the shift they are on.

so it needs to first find the Date, take this week 11-Jun is the Monday date
and today is the 13-Jun, so it must look in the 11-Jun line for the D3 (the
name) Value then goto the top of the page and return the Shift Say I in this
instance.

im prob looking to high for this and i have all but fried my brain now
trying to do it.


"Barb Reinhardt" wrote:

I think I'd use the MATCH and INDEX functions to do this. Take a look at
those and if you have other questions, come back.

"Gareth - Network analyst." wrote:

Hi guys, I got a question and Fav to ask

I have a sheet that has a series of Dates being the Mondays dates through
the year next to each date is a listing of 4 names.

EG:
Date A B C D
11-Jun Bob Frank Gareth Trevor
18-Jun Trevor Bob Frank Gareth

What i want to do is this.

I have a sheet that has the Current date =today() {dd-mmm} i want it to take
that value and find it so should the date be 13-JUN how do i get it to return
the value from say A3 because that date falls into the 11-Jun section?

So basically to clarify i want to do a Vlookup on a name that falls on the
Mondays date when compared to todays date and then return the A,B,C or D at
the top. Can this be done? and how would i do it?

Thanks in advance for any assist.