View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Merlynsdad Merlynsdad is offline
external usenet poster
 
Posts: 37
Default Dividing variables

I need to divide two variables by each other to get a percentage.

intRows represents the total rows in the spreadsheet.
intPerf represents the rows left after I remove some rows with code.
intPct = intPerf/intRows.

All are dimensioned as integers.

When I do the calculation the value in the Watch List of intRows is 88,
intPerf is 34. intPct should then be 38.63% but is showing zero. The code for
the division is

intPct=intPerf/intRows

What am I doing wrong?