#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default column to column

Here is what I am trying to do: In cell G15, I want it to look at cell G12
and compare G12 value to a list of values in P26 thru P68. Using closest
match, place the corresponding value from column Q. Example: If G12 is 5320,
look at column P and find closest match. That would be 5300 (P28). Place in
G15 the value in Q28.

I think I should be using VLOOKUP, correct?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 364
Default column to column

"reed0427" wrote in message
...
Here is what I am trying to do: In cell G15, I want it to look at cell G12
and compare G12 value to a list of values in P26 thru P68. Using closest
match, place the corresponding value from column Q. Example: If G12 is
5320,
look at column P and find closest match. That would be 5300 (P28). Place
in
G15 the value in Q28.

I think I should be using VLOOKUP, correct?


For inexact matches, VLOOKUP will find the closest match that is smaller
than you are looking up. (See VLOOKUP in Help.) If you want the numerically
closest, look he
http://www.cpearson.com/excel/lookups.htm#ClosestMatch


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default column to column

Question:

By "closest", do you mean *either* over or under the lookup value?

For example - looking for 5320 -
Do you want 5321 to be selected over, say, 5300, even though 5321 is larger
then 5320?

If so, try this *array* formula:

=INDEX(Q26:Q68,MATCH(MIN(ABS(P26:P68-G12)),ABS(P26:P68-G12),0))

--
Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
--
On the other hand, if you want the closest match, *without going over* the
lookup value, you can use Lookup, or Vlookup,
*BUT*, the data in Column P *must* be sorted, ascending.

For example:

=LOOKUP(G12,P26:Q68)
OR
=VLOOKUP(G12,P26:Q68,2)

The last 2 examples are entered normally, with a simple <Enter.

HTH,

RD

----------------------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
----------------------------------------------------------------------------------------


"reed0427" wrote in message
...
Here is what I am trying to do: In cell G15, I want it to look at cell G12
and compare G12 value to a list of values in P26 thru P68. Using closest
match, place the corresponding value from column Q. Example: If G12 is
5320,
look at column P and find closest match. That would be 5300 (P28). Place
in
G15 the value in Q28.

I think I should be using VLOOKUP, correct?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default column to column

Yikes! OK, here's the formula that isn't working:
(cell G15) =VLOOKUP(G13,1,P26:P68,2)

G13: This value is, for example, 5145.
P26 thru P68 is 3800-5400. Closest match is 5100 (P32)
Q26 thr Q68 is 78.0-74.0. Q32 is 77.0.

I want Q32's 77.0 to appear in G15). I can't seem to get the formula right.

"Stephen" wrote:

"reed0427" wrote in message
...
Here is what I am trying to do: In cell G15, I want it to look at cell G12
and compare G12 value to a list of values in P26 thru P68. Using closest
match, place the corresponding value from column Q. Example: If G12 is
5320,
look at column P and find closest match. That would be 5300 (P28). Place
in
G15 the value in Q28.

I think I should be using VLOOKUP, correct?


For inexact matches, VLOOKUP will find the closest match that is smaller
than you are looking up. (See VLOOKUP in Help.) If you want the numerically
closest, look he
http://www.cpearson.com/excel/lookups.htm#ClosestMatch



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default column to column

That's it, =VLOOKUP(G12,P26:Q68,2) did the trick. Thanks RAGdyer!

"RAGdyer" wrote:

Question:

By "closest", do you mean *either* over or under the lookup value?

For example - looking for 5320 -
Do you want 5321 to be selected over, say, 5300, even though 5321 is larger
then 5320?

If so, try this *array* formula:

=INDEX(Q26:Q68,MATCH(MIN(ABS(P26:P68-G12)),ABS(P26:P68-G12),0))

--
Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
--
On the other hand, if you want the closest match, *without going over* the
lookup value, you can use Lookup, or Vlookup,
*BUT*, the data in Column P *must* be sorted, ascending.

For example:

=LOOKUP(G12,P26:Q68)
OR
=VLOOKUP(G12,P26:Q68,2)

The last 2 examples are entered normally, with a simple <Enter.

HTH,

RD

----------------------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
----------------------------------------------------------------------------------------


"reed0427" wrote in message
...
Here is what I am trying to do: In cell G15, I want it to look at cell G12
and compare G12 value to a list of values in P26 thru P68. Using closest
match, place the corresponding value from column Q. Example: If G12 is
5320,
look at column P and find closest match. That would be 5300 (P28). Place
in
G15 the value in Q28.

I think I should be using VLOOKUP, correct?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default column to column

Appreciate the feed-back.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"reed0427" wrote in message
...
That's it, =VLOOKUP(G12,P26:Q68,2) did the trick. Thanks RAGdyer!

"RAGdyer" wrote:

Question:

By "closest", do you mean *either* over or under the lookup value?

For example - looking for 5320 -
Do you want 5321 to be selected over, say, 5300, even though 5321 is
larger
then 5320?

If so, try this *array* formula:

=INDEX(Q26:Q68,MATCH(MIN(ABS(P26:P68-G12)),ABS(P26:P68-G12),0))

--
Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of
the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
--
On the other hand, if you want the closest match, *without going over* the
lookup value, you can use Lookup, or Vlookup,
*BUT*, the data in Column P *must* be sorted, ascending.

For example:

=LOOKUP(G12,P26:Q68)
OR
=VLOOKUP(G12,P26:Q68,2)

The last 2 examples are entered normally, with a simple <Enter.

HTH,

RD

----------------------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
----------------------------------------------------------------------------------------


"reed0427" wrote in message
...
Here is what I am trying to do: In cell G15, I want it to look at cell
G12
and compare G12 value to a list of values in P26 thru P68. Using closest
match, place the corresponding value from column Q. Example: If G12 is
5320,
look at column P and find closest match. That would be 5300 (P28). Place
in
G15 the value in Q28.

I think I should be using VLOOKUP, correct?






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
divide column(x) by column(y) to give column(x/y) in excel? James New Users to Excel 2 April 24th 23 11:46 AM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
formula : =(column A)+(column B)-(column C). Why won't it work? Kristin Drover Excel Discussion (Misc queries) 3 October 18th 06 08:48 PM
Divide Column A by Column B multiply Column C Stumped Excel Worksheet Functions 3 December 28th 05 05:51 AM
what formula do i put for column m = column k minus column l in e. jenniss Excel Discussion (Misc queries) 5 January 6th 05 08:18 PM


All times are GMT +1. The time now is 01:10 PM.

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

About Us

"It's about Microsoft Excel"