![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 1
|
As a price is calculated, it references a table and is rounded to the top of the range it falls within. $8.13 falls within 7.99 - 8.49 resulting in 8.49.
Thanks [ This Message was edited by: duhar on 2002-05-19 18:08 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
Use vlookup.
Your lookup table should contain only the top values (not bottom and not range) of each increment in the first column and the price to apply in the second column. Download example Vlookup from MyVlookup at: http://www.thewordexpert.com/downloads.htm
__________________
~Anne Troy |
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,029
|
Hey,
Quote:
=CEILING(A2,0.5)-0.01 Adam |
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Lets say that the price range in your lookup table is C2:C25 and A1 houses a price that you want to lookup up in order to "round". =INDEX(C2:25,MATCH(A1,C2:25)+1) This formula will give you the "top" value for every price you look up. =IF(COUNTIF(C2:25,A1),A1,INDEX(C2:25,MATCH(A1,C2:25)+1)) This formula determines whether the price you look up exists in the table (exact match). If so, it returns the price itself, otherwise it sets the price to the "top" value it finds. Aladin |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|