Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
mmmm....
Until I saw Biff's reply I never noticed that your data was not linear. Go with Biff. -- Regards, Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Sandy Mann" wrote in message ... Lookup will accept ROUNDUP() in its first argument: =LOOKUP(ROUNDUP(4.5,0),A1:A5,B1:B5) -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get Cell Address From Lookup (Alternative to Lookup) | Excel Worksheet Functions | |||
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup | Excel Worksheet Functions | |||
Sumproduct - Condition based on lookup of a Lookup | Excel Discussion (Misc queries) | |||
Pivot table doing a lookup without using the lookup function? | Excel Discussion (Misc queries) | |||
How do I lookup and return different values when the lookup value. | Excel Discussion (Misc queries) |