Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Hi, I need to find a way of returning the cell values that are directly above and below a specific cell. For example, suppose I have the following list in column A: dogs cats fish mice There is another cell (say cell B1) in which the user inputs one of the items in the list and then another 2 cells (say B2 and B3) that return the entries above and below the user-input entry i.e. in this case, the user input "cats" and so in cell B2 would be displayed "dogs" and in cell B3 "fish". I cannot get this to work however. I have tried several functions (e.g. HLOOKUP) but it does not work as intended. Can anyone give me any help/advice? Many thanks -Rob -- TheRobsterUK ------------------------------------------------------------------------ TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924 View this thread: http://www.excelforum.com/showthread...hreadid=485713 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
With your list of animals is in Column A (no repeats) beginning in A2 A1: Animals A2 through A???: List of animals B1: (User inputs an animal) or...even better Select B1 DataData Validation \Allow: List \Source: A2: (end of your list) For item before selection: B2: =INDEX(A:A,MATCH(B1,A:A,0)-1,1) For item after selection: B3: =INDEX(A:A,MATCH(B1,A:A,0)+1,1) Does that help? €¢€¢€¢€¢€¢€¢€¢€¢€¢€¢ Regards, Ron "TheRobsterUK" wrote: Hi, I need to find a way of returning the cell values that are directly above and below a specific cell. For example, suppose I have the following list in column A: dogs cats fish mice There is another cell (say cell B1) in which the user inputs one of the items in the list and then another 2 cells (say B2 and B3) that return the entries above and below the user-input entry i.e. in this case, the user input "cats" and so in cell B2 would be displayed "dogs" and in cell B3 "fish". I cannot get this to work however. I have tried several functions (e.g. HLOOKUP) but it does not work as intended. Can anyone give me any help/advice? Many thanks -Rob -- TheRobsterUK ------------------------------------------------------------------------ TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924 View this thread: http://www.excelforum.com/showthread...hreadid=485713 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Hi Ron, Yes I got it working with some slight adaptations to your suggestion. Many thanks for the response. :) -Rob -- TheRobsterUK ------------------------------------------------------------------------ TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924 View this thread: http://www.excelforum.com/showthread...hreadid=485713 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
Copy one cell to entire column | Excel Discussion (Misc queries) | |||
up to 7 functions? | Excel Worksheet Functions | |||
Syntax for inferred cell references | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |