How to use Index?

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

Guest

Does anyone have any suggestions on how to locate a value from a list?
The given list of numbers under column A
1,3,5,7,11,13,17,19,23
If I enter an integer 15 in cell B2, then it will return 17 in cell B1 and
13 in cell B3.
If I enter an integer 13 in cell B2, then it will return 13 in cell B1 and
13 in cell B3, since the list contains the number of 13
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
Does anyone have any suggestions on how to locate a value from a list?
The given list of numbers under column A
1,3,5,7,11,13,17,19,23
If I enter an integer 15 in cell B2, then it will return 17 in cell B1 and
13 in cell B3.
If I enter an integer 13 in cell B2, then it will return 13 in cell B1 and
13 in cell B3, since the list contains the number of 13
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

B1: =INDEX(A1:A9,MATCH(B2,A1:A9,1))
B3: =INDEX(A1:A9,MATCH(B2,A1:A9,1)+1*(COUNTIF(A1:A9,B2)<1))


--ron
 
Back
Top