Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to find the values from a list?

Does anyone know how to find following from a list? For example,
Colume A
[A1] 1
[A2] 5
[A3] 9
[A4] 12
[A5] 16
[A6] 28

In Colume B, when I input the value of 7 in cell B2, then 5 will display in
B1 and 9 will display in B2. If I input the value of 16 in cell B2, then 16
will be displayed in B1 and 28 will be displayed in B3.

Colume B
[B1] 5
[B2] 7 input value
[B3] 9

Colume B
[B1] 16
[B2] 16 input value
[B3] 28

Does anyone have any suggestion on how to code it in excel?
Thank for any suggestion
Eric

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Try this...

Thank you for your suggestion

The formula for [B3]=LOOKUP(B2,$A$1:$A$6,$A$2:$A$7) does not able to display
the last value 27, if the input is equal the last value. Could you please
give me any suggestion on fixing this situation?

Colume B
[B1] 16
[B2] 27 input value
[B3] 0

On the other hands, I forget to describe this case

Colume A
[A1] 1
[A2] 5
[A3] 9
[A4] 12
[A5] 16
[A6] 28

In Colume B, when I input the value of 28 in cell B2, then 1 will display in
B1 and 28 will display in B2.

Colume B
[B1] 1
[B2] 28 input value
[B3] 28

Could you please give me any suggestion
Thank you very much
Eric
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default Try this...

[A7] 28
[B1] =IF(B2=A6,1,VLOOKUP(B2,$A$1:$A$6,1))
[B3] =LOOKUP(B2,$A$1:$A$6,$A$2:$A$7)

"Eric" wrote:

Thank you for your suggestion

The formula for [B3]=LOOKUP(B2,$A$1:$A$6,$A$2:$A$7) does not able to display
the last value 27, if the input is equal the last value. Could you please
give me any suggestion on fixing this situation?

Colume B
[B1] 16
[B2] 27 input value
[B3] 0

On the other hands, I forget to describe this case

Colume A
[A1] 1
[A2] 5
[A3] 9
[A4] 12
[A5] 16
[A6] 28

In Colume B, when I input the value of 28 in cell B2, then 1 will display in
B1 and 28 will display in B2.

Colume B
[B1] 1
[B2] 28 input value
[B3] 28

Could you please give me any suggestion
Thank you very much
Eric

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Try this...

Thank you very much
Eric
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
values not appearing in autofilter list maryj Excel Discussion (Misc queries) 5 September 13th 06 10:38 PM
matching one value in a list of values David Kinsley Excel Worksheet Functions 3 January 27th 06 12:39 AM
find sum in list of of numbers Jim Thomlinson Excel Worksheet Functions 5 January 4th 06 07:07 PM
Find in list function jrup New Users to Excel 2 August 23rd 05 12:16 AM
Selecting data from a list based on entered values GrantM Excel Discussion (Misc queries) 1 December 20th 04 10:59 AM


All times are GMT +1. The time now is 06:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"