Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Does anyone have any suggestions on how to determine the value from a list?
There is a list of number on row 1 226 [A1], 230 [B1], 233 [C1], 238 [D1], ... There is a number on row 2 228 [A2] I would like to determine which max number on the list have the minimum difference with the number 228 [A2]. In this case, the number having minimum difference with 228 [A2] are 226 [A1] and 230 [B1], because both number have the same difference 2. 228 - 226 = 2 230 - 228 = 2 then I prefer to select the max number 230 between 226 and 230, and return this value in cell C1 Does anyone have any suggestions on how to do it in excel? Thank in advance for any suggestions Eric |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello Eric,
Enter with CTRL + SHIFT + ENTER =MAX(IF(ABS($A$1:$D$1-A2)=MIN(ABS($A$1:$D$1-A2)),$A$1:$D$1)) Regards, Bernd |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you very much for your suggestions
Does anyone have any suggestions what the default value should be assign for each empty cell? I would like to assign the default value for if statement on row 1, such as If(True, any number, default), but I cannot assign "" into formula If(True, any number, ""), which does not work for following statement, because of this character "". Enter with CTRL + SHIFT + ENTER =MAX(IF(ABS($A$1:$D$1-A2)=MIN(ABS($A$1:$D$1-A2)),$A$1:$D$1)) Does anyone have any suggestions? Thank for any suggestions Eric |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try:
=MAX(IF($A$1:$D$1<"",IF(ABS($A$1:$D$1-A2)=MIN(ABS($A$1:$D$1-A2)),$A$1:$D$1))) to ignore empty cells Enter with Ctrl+Shift+Enter "Eric" wrote: Thank you very much for your suggestions Does anyone have any suggestions what the default value should be assign for each empty cell? I would like to assign the default value for if statement on row 1, such as If(True, any number, default), but I cannot assign "" into formula If(True, any number, ""), which does not work for following statement, because of this character "". Enter with CTRL + SHIFT + ENTER =MAX(IF(ABS($A$1:$D$1-A2)=MIN(ABS($A$1:$D$1-A2)),$A$1:$D$1)) Does anyone have any suggestions? Thank for any suggestions Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to determine the value from a list? | Excel Discussion (Misc queries) | |||
How to determine the values from a list? | Excel Discussion (Misc queries) | |||
How to determine the values from a list? | Excel Worksheet Functions | |||
How to determine second (and then third) highest value in a list | Excel Discussion (Misc queries) | |||
List ? - How do I make information in one cell determine list to u | Excel Worksheet Functions |