You're right Jim
Remove the Dim rrow As Long
That's why it worked.......rrows was never Dimmed as Long.
If it had, the decimal would not be returned.
One advantage?? of not using Option Explicit<g>
Gord
On Sat, 30 Sep 2006 09:13:57 -0700, "Jim Cone" <jim.coneXXX[ at ]rcn.comXXX> wrote:
[Quoted Text] >Gord, > >Check rrow vs. rrows > >Regards, >Jim Cone >San Francisco, USA > > >"Gord Dibben" <gorddibbATshawDOTca> >wrote in message >news:v15th2hjk7rqbt79dsb5desejdtuledfun[ at ]4ax.com... >Sub test() >Dim lastrow As Long >Dim rrow As Long > lastrow = Cells(Rows.Count, "A").End(xlUp).Row > rrows = lastrow / 4 >MsgBox rrows 'returns 34.5 if lastrow is 138 >End Sub > >Gord Dibben MS Excel MVP
|