Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default VLookup only calling one cell

Hello,
I am trying to use vlookup to search for a temperature within the following
data and return the corresponding "hot" or "cold."

t1 t2 stream
20 135 cold
170 60 hot
150 80 cold
50 140 hot

THE RESULT:

T Ti
170 hot
150 cold
140 cold
135 cold
80 cold
60 cold
50 cold
20 cold

After the first temperature (170), the formula is only returning the
top"cold" (C3) within the above table. Here is my formula:
=VLOOKUP(A8,$A$2:$C$5,3)

Is there something about the vlookup function I am missing? Any help is
much appreciated, thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default VLookup only calling one cell

You need to sort your first table.

Hope this helps.

Pete


On Sep 21, 8:25*pm, Alexander
wrote:
Hello,
I am trying to use vlookup to search for a temperature within the following
data and return the corresponding "hot" or "cold."

t1 * * *t2 * * *stream
20 * * *135 * * cold
170 * * 60 * * *hot
150 * * 80 * * *cold
50 * * *140 * * hot

THE RESULT:

T * * * Ti
170 * * hot
150 * * cold
140 * * cold
135 * * cold
80 * * *cold
60 * * *cold
50 * * *cold
20 * * *cold

After the first temperature (170), the formula is only returning the
top"cold" *(C3) within the above table. *Here is my formula: *
=VLOOKUP(A8,$A$2:$C$5,3)

Is there something about the vlookup function I am missing? *Any help is
much appreciated, thank you.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default VLookup only calling one cell

hi
your raw data must be sorted in assencing order.

Regards
FSt1

"Alexander" wrote:

Hello,
I am trying to use vlookup to search for a temperature within the following
data and return the corresponding "hot" or "cold."

t1 t2 stream
20 135 cold
170 60 hot
150 80 cold
50 140 hot

THE RESULT:

T Ti
170 hot
150 cold
140 cold
135 cold
80 cold
60 cold
50 cold
20 cold

After the first temperature (170), the formula is only returning the
top"cold" (C3) within the above table. Here is my formula:
=VLOOKUP(A8,$A$2:$C$5,3)

Is there something about the vlookup function I am missing? Any help is
much appreciated, thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default VLookup only calling one cell

vlookup has an optional fourth parameter to specify an exact match versus an
approximate match
=VLOOKUP(A8,$A$2:$C$5,3,FALSE)

vlookup will attempt to match A8 to A2:A5 and return the corresponding value
from column C. I notice some of the values in your table are in column B -
vlookup won't match A8 to column B with the formula as it is written. If
that is your intent, you could try

=If(IsNumber(Match(A8,A2:A5,0)), Vlookup(A8, A2:C5, 3, False), Vlookup(A8,
B2:C5, 2, False))


"Alexander" wrote:

Hello,
I am trying to use vlookup to search for a temperature within the following
data and return the corresponding "hot" or "cold."

t1 t2 stream
20 135 cold
170 60 hot
150 80 cold
50 140 hot

THE RESULT:

T Ti
170 hot
150 cold
140 cold
135 cold
80 cold
60 cold
50 cold
20 cold

After the first temperature (170), the formula is only returning the
top"cold" (C3) within the above table. Here is my formula:
=VLOOKUP(A8,$A$2:$C$5,3)

Is there something about the vlookup function I am missing? Any help is
much appreciated, thank you.

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
SUMPRODUCT, calling a value from a cell as a value to search on [email protected] Excel Worksheet Functions 2 August 30th 07 10:39 AM
Calling cell values from random sheets from a base sheet [email protected] Excel Worksheet Functions 2 January 19th 07 08:21 PM
Calling procedure when leaving cell jeffP Excel Worksheet Functions 5 February 9th 06 08:59 AM
Calling an Add-In BillCPA Excel Discussion (Misc queries) 2 August 11th 05 09:32 PM
When calling a different file, can I make the tab equal to a cell? thebigd08 Excel Discussion (Misc queries) 1 June 24th 05 12:39 AM


All times are GMT +1. The time now is 03:36 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"