View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default VBA code and decimals

I just did this and got 34.5

Sub lastrowdecimal()
lastrow = 138
rrows = lastrow / 4
MsgBox rrows
End Sub

--
Don Guillett
SalesAid Software

"pcor" wrote in message
...
I have some VBA code as this:
rrows=lastrow/4

if lastrow is 138 then rrows should be 34.5 but I always get 34(no
decimal)
How do I fix that
Thanks