Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would probably skip the VB code on this one and just use an Excel
CEILING formula. In column B =Ceiling(A1,.5) Then drag over the cells in column B you want this formula applied to. helmekki wrote in message ... ColumA ColumB i have problem in this code, the integers in columB do not appear correctly i tried to use this code to first check if A1*.005 is between 0---.5 then put b.value = Sub Tax4SalesTax() Dim c As Range Dim b As Range For Each b In Range("B1:B5") For Each c In Range("A1:A5") Select Case c * 0.005 Case 0 To 0.5 b.Value = 0.5 Case 0.5 To 1 b.Value = 1 Case 1 To 1.5 b.Value = 1.5 Case 1.5 To 2 b.Value = 2 Case 2 To 2.5 b.Value = 2.5 Case 2.5 To 3 b.Value = 3 End Select Next Next End Sub i appreciate any help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select case | Excel Discussion (Misc queries) | |||
Case Select | Excel Worksheet Functions | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Select Case | Excel Discussion (Misc queries) | |||
select case help please | Excel Programming |