View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default How to valid the values?

On Sat, 25 Aug 2007 03:34:01 -0700, Eric
wrote:

Does anyone have any suggestions on how to valid the values?

There is a list of value in column A
1,5,6,8,9,10,3,20
There is a given value in cell B1, which is 4
The value of range is 1 in cell D1
I would like to determine whether the value 4 in cell B1 +/- 1 in cell D1
[value of range] is matching any value in column A.
In this case, the matching values are between 3 [4-1] and 5 [4+1], and 5
exists in column A, then the value 4 in cell B1 is valid, and return true in
cell C1.
Does anyone have any suggestions on how to do it in excel?
Thank everyone very much for any suggestions
Eric


Minor change:

=OR(ISNUMBER(MATCH(ROW(INDIRECT(MAX(B1-D1,1)&":"&B1+D1)),A1:A8,0)))


--ron