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

Hi,

I have one question concerning a Lookup function. Let suppose that we have
2 columns A and B. This function works fine and returnes a value from
column B which corresponds to a value from column A from the same row when
A value is EQUAL to my input (everything according to description in HELP).
When we have a value which differs from values given in column A (for
instance: in A we have 2, 3, 4, 5, 7, but my input is 4,5) then LOOKUP
returns a value from c. B which corresponds to value 4 from c. A. It rounds
down. I would expect lookup to return a value which corresponds to value 5
from c. A. It means I would like LOOKUP to round up NOT down. Is it
possible in LOOKUP function? Maybe another function should be used by me?

Thanks

Andrew


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default LOOKUP

If you want it to "round up" sort your table in descending order.

Instead of this:

2, 3, 4, 5, 7

Do this:

7, 5, 4, 3, 2

And use a formula like this:

=INDEX(C1:C5,MATCH(4.5,A1:A5,-1))

This formula will return the value corresponding to 5. Note that if the
lookup_value is greater than the highest number in the lookup_array you'll
get a #N/A error since there's nothing to "round up" to.


--
Biff
Microsoft Excel MVP


"Andrew" wrote in message
...
Hi,

I have one question concerning a Lookup function. Let suppose that we have
2 columns A and B. This function works fine and returnes a value from
column B which corresponds to a value from column A from the same row when
A value is EQUAL to my input (everything according to description in
HELP).
When we have a value which differs from values given in column A (for
instance: in A we have 2, 3, 4, 5, 7, but my input is 4,5) then LOOKUP
returns a value from c. B which corresponds to value 4 from c. A. It
rounds
down. I would expect lookup to return a value which corresponds to value 5
from c. A. It means I would like LOOKUP to round up NOT down. Is it
possible in LOOKUP function? Maybe another function should be used by me?

Thanks

Andrew




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

Hi Sandy and Biff,

Thanks for your replay. I haven't supposed that lookup would accept
"roundup". Moreover thank you Biff for your idea.

Kind regards

Andrew


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default LOOKUP

You're welcome!

--
Biff
Microsoft Excel MVP


"Andrew" wrote in message
...
Hi Sandy and Biff,

Thanks for your replay. I haven't supposed that lookup would accept
"roundup". Moreover thank you Biff for your idea.

Kind regards

Andrew



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
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Sumproduct - Condition based on lookup of a Lookup Hari Excel Discussion (Misc queries) 12 May 31st 06 09:28 AM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM
How do I lookup and return different values when the lookup value. kg Excel Discussion (Misc queries) 1 January 20th 05 12:53 AM


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