guys,
i am back with one more problem.Now i got the value in terms of Hr
like (1.75 for 1.45hrs) which is of number format.
i have got a series of cells like this calculating the Hrs. sa
A1=1.75, A2=1.50 a3=2.50
now i want these cells to be accessed in VBA and add all the cells(
can do this in Excel also but i have to perform some other operatio
with the sum so i have choosen to use VBA) to get the valu
5.75(a1+a2+a3)
here is the code i have used for it.
Code
-------------------
Dim iTotHrs As Integer
iTotHrs =0
For i =1 To 3 Step 1
iTotHrs = iTotHrs + CInt(ActiveWorkbook.ActiveSheet.Cells(i, 1).Value)
' | |
' v v
' integer decimal : it will be 1.50,1.75 etc
Next
-------------------
here comes the actual probs.
is it make a difference that adding an integer with decimal value.
i am getting like 2, 2 (after rouding 1.50,1.75) which i am no
interested.
how can i solve this.
thanks & regards,
mahes
--
itsmahesh
-----------------------------------------------------------------------
itsmaheshp's Profile:
http://www.excelforum.com/member.php...fo&userid=1585
View this thread:
http://www.excelforum.com/showthread.php?threadid=27689