Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Comparing to a range and printing value

Hello,

I have a column of data like this (just a sample):
16.81
17.25
16.51
17.63
17.07

Then, at a different area in the same worksheet I have three other columns
like this (again, just a sample):
16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04

What I want to do is take the number from the first set (i.e. 16.81), figure
out which range it corresponds to in the second data set (16.75 - 17) and
then print the 3rd number in the second set (3.07) in the cell next to the
number in the first set. So, I'd get:

16.81 3.07
17.25 3.07
16.51 3.1
17.63 3.04
17.07 3.07

Any suggestions would be much appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Comparing to a range and printing value

Hi again

Thanks for that! It works for the first part, but what I actually have is 5
rows in the second table:

16.5 16.74 3.1 4.2 4.5
16.75 16.99 3.07 4.1 4.4
17 17.24 3.07 4.2 4.6
17.25 17.49 3.07 4.3 4.4
17.5 17.74 3.04 4.1 4.3


Sometimes I need to print the 3rd number, other times I'd need the 4th or
5th. How can I do this? I have tried:

=VLOOKUP(A1,(G$1:H$5,K$1:K$5),3)

and

=VLOOKUP(A1,AND(G$1:H$5,K$1:K$5),3)

and other variations, but nothing seems to work. Is there any way to do this?

Thanks again!!


"T. Valko" wrote:

Try this:

With this table in the range G1:I5 -

16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04


A1 = 16.81

=VLOOKUP(A1,G$1:I$5,3)


--
Biff
Microsoft Excel MVP


"Alyssa M" <Alyssa wrote in message
...
Hello,

I have a column of data like this (just a sample):
16.81
17.25
16.51
17.63
17.07

Then, at a different area in the same worksheet I have three other columns
like this (again, just a sample):
16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04

What I want to do is take the number from the first set (i.e. 16.81),
figure
out which range it corresponds to in the second data set (16.75 - 17) and
then print the 3rd number in the second set (3.07) in the cell next to the
number in the first set. So, I'd get:

16.81 3.07
17.25 3.07
16.51 3.1
17.63 3.04
17.07 3.07

Any suggestions would be much appreciated!




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Comparing to a range and printing value

Ooops! Never mind! I didn't realize that the last number was the column
number (I thought it was searching for the number closest to 3 for some
reason).

Anyway, thank you so much! You just saved me a ton of time :D

"Alyssa M" wrote:

Hi again

Thanks for that! It works for the first part, but what I actually have is 5
rows in the second table:

16.5 16.74 3.1 4.2 4.5
16.75 16.99 3.07 4.1 4.4
17 17.24 3.07 4.2 4.6
17.25 17.49 3.07 4.3 4.4
17.5 17.74 3.04 4.1 4.3


Sometimes I need to print the 3rd number, other times I'd need the 4th or
5th. How can I do this? I have tried:

=VLOOKUP(A1,(G$1:H$5,K$1:K$5),3)

and

=VLOOKUP(A1,AND(G$1:H$5,K$1:K$5),3)

and other variations, but nothing seems to work. Is there any way to do this?

Thanks again!!


"T. Valko" wrote:

Try this:

With this table in the range G1:I5 -

16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04


A1 = 16.81

=VLOOKUP(A1,G$1:I$5,3)


--
Biff
Microsoft Excel MVP


"Alyssa M" <Alyssa wrote in message
...
Hello,

I have a column of data like this (just a sample):
16.81
17.25
16.51
17.63
17.07

Then, at a different area in the same worksheet I have three other columns
like this (again, just a sample):
16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04

What I want to do is take the number from the first set (i.e. 16.81),
figure
out which range it corresponds to in the second data set (16.75 - 17) and
then print the 3rd number in the second set (3.07) in the cell next to the
number in the first set. So, I'd get:

16.81 3.07
17.25 3.07
16.51 3.1
17.63 3.04
17.07 3.07

Any suggestions would be much appreciated!




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Comparing to a range and printing value

How do you determine which column number you want? You can probably factor
that into the formula instead of changing the formula all the time.

--
Biff
Microsoft Excel MVP


"Alyssa M" wrote in message
...
Ooops! Never mind! I didn't realize that the last number was the column
number (I thought it was searching for the number closest to 3 for some
reason).

Anyway, thank you so much! You just saved me a ton of time :D

"Alyssa M" wrote:

Hi again

Thanks for that! It works for the first part, but what I actually have is
5
rows in the second table:

16.5 16.74 3.1 4.2 4.5
16.75 16.99 3.07 4.1 4.4
17 17.24 3.07 4.2 4.6
17.25 17.49 3.07 4.3 4.4
17.5 17.74 3.04 4.1 4.3


Sometimes I need to print the 3rd number, other times I'd need the 4th or
5th. How can I do this? I have tried:

=VLOOKUP(A1,(G$1:H$5,K$1:K$5),3)

and

=VLOOKUP(A1,AND(G$1:H$5,K$1:K$5),3)

and other variations, but nothing seems to work. Is there any way to do
this?

Thanks again!!


"T. Valko" wrote:

Try this:

With this table in the range G1:I5 -

16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04

A1 = 16.81

=VLOOKUP(A1,G$1:I$5,3)


--
Biff
Microsoft Excel MVP


"Alyssa M" <Alyssa wrote in message
...
Hello,

I have a column of data like this (just a sample):
16.81
17.25
16.51
17.63
17.07

Then, at a different area in the same worksheet I have three other
columns
like this (again, just a sample):
16.5 16.74 3.1
16.75 16.99 3.07
17 17.24 3.07
17.25 17.49 3.07
17.5 17.74 3.04

What I want to do is take the number from the first set (i.e. 16.81),
figure
out which range it corresponds to in the second data set (16.75 - 17)
and
then print the 3rd number in the second set (3.07) in the cell next
to the
number in the first set. So, I'd get:

16.81 3.07
17.25 3.07
16.51 3.1
17.63 3.04
17.07 3.07

Any suggestions would be much appreciated!






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
comparing one to one cell within range caroline Excel Worksheet Functions 3 January 29th 08 09:37 PM
Printing a named range RheaS Excel Discussion (Misc queries) 1 June 27th 07 07:28 PM
Comparing One Range and Adding Another statusquo Excel Worksheet Functions 3 December 9th 05 02:54 AM
Comparing a Range of Values jpx Excel Discussion (Misc queries) 4 November 22nd 05 11:28 PM
Comparing a cell result with a pre-defined value range Antony Weldon Excel Worksheet Functions 1 November 23rd 04 12:51 PM


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