View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Martin Fishlock Martin Fishlock is offline
external usenet poster
 
Posts: 694
Default find cell address that meets the criteria

Hi:

This gives the index number for the the entry:

=MATCH(B$1-1,$A$1:$A$4,1)+1

As this gives the cell address:

=ADDRESS(MATCH(B$1-1,$A$1:$A$4,1)+1,1)

It is a little bit of a mix becasue the match function wants the data sorted
in descending order for the match you wanted.

So I deducted one from the date and wound the one less than the date wanted
(ie the case where the date is the same as an entry and then I add 1 row on
to the row.

To work best sort in to decending aorder as try

25-Jan-07
19-Nov-06
10-Feb-06
27-Aug-05

=MATCH(B$1,$A$1:$A$4,-1)

There are problems at the limits. try it out.
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"tkraju via OfficeKB.com" wrote:

Col a............... Col B

27-Aug-2005 ..................03-Mar-2006
10-Feb-2006
19-nov-2006
25-Jan-2007

I am looking for a function that gives cell address in range A1:A4 ,date that
is(nearest) greater than B1 date.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200702/1