Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i have all kinds of different prices for items that i need to make all of
them no matter what the margin i give it it turns that cell to the next .99$ never rounding down only up even if its 15.01$ i need it to go to 15.99$ thanks for help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=ROUNDUP(A1,0)-0.01
-- Kind regards, Niek Otten Microsoft MVP - Excel "Garett" wrote in message ... |i have all kinds of different prices for items that i need to make all of | them no matter what the margin i give it it turns that cell to the next .99$ | never rounding down only up even if its 15.01$ i need it to go to 15.99$ | thanks for help | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You don't actually need to use VB to do this. You can simply use:
=CEILING(A1+0.01,1)-0.01 **I've assumed that you want $16- 16.99 and 16.99 to stay at 16.99. However, if you want to use VB, just do basically the same thing. Do something like this: Sub test_round() For i = 1 To 4 initial = Cells(i, 1).Value newValue = Application.WorksheetFunction.Ceiling(initial + 0.01, 1) - 0.01 Cells(i, 2).Value = newValue Next End Sub Here I've assumed the initail values are in column A, and the resulting values will be placed in column B. I've also assumed there are only 4 rows of numbers to be changed, but without knowing more about the data structure, this is the best I can do. Garett wrote: i have all kinds of different prices for items that i need to make all of them no matter what the margin i give it it turns that cell to the next .99$ never rounding down only up even if its 15.01$ i need it to go to 15.99$ thanks for help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Assuming value to be rounded is in cell A1: =ROUNDUP(A1,0)-0.01 -- Mark K ------------------------------------------------------------------------ Mark K's Profile: http://www.excelforum.com/member.php...o&userid=14117 View this thread: http://www.excelforum.com/showthread...hreadid=573252 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With you data in A1: and downward
enter into B1 =INT(A1)+0.99 and Copy down "Garett" wrote: i have all kinds of different prices for items that i need to make all of them no matter what the margin i give it it turns that cell to the next .99$ never rounding down only up even if its 15.01$ i need it to go to 15.99$ thanks for help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumif trying to Sum cells with Round Function | Excel Discussion (Misc queries) | |||
How do I format cells to round up? | Excel Worksheet Functions | |||
Increase all cells by a % and round up? | Excel Discussion (Misc queries) | |||
round up cells to $xx.99 | Excel Worksheet Functions | |||
How do I format cells to round to the nearest thousands without .. | Excel Discussion (Misc queries) |