LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default cell has decimal value returns whole number, why?

HI

New to VB and trying to write a program that gets two values from
cells and calculates a column of values.

cell "C19" = 4.0938

cell "C21" = 4.8438
=========================
Sub FillInRange()

Dim intK As Long
Dim intT As Long
Dim intX As Long
Dim intY As Long

intX = Range("C19").Value
intY = Range("C21").Value
intT = Range("C15").Value
Range("L28").Select

For I = 1 To (intT - 1) Step 1
intK = intX + (intY * I)
Selection.Value = intK
ActiveCell.Offset(1, 0).Select
Next

End Sub
=======================

But in the program they appear as C19 = 4 C21 = 5
Is there a way to get the decimal value into the variables?

Sorry if this dosen't make to much sense as I am not sure of the terms
to use.
Jim

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function to put worksheet name in cell returns text, need number Pennyc Excel Discussion (Misc queries) 5 September 21st 09 05:44 PM
Format for Whole number and 1 Decimal in same Cell Sean Excel Worksheet Functions 4 November 30th 07 01:44 PM
Function that returns the page number a cell falls on Don-in-Kent-UK Excel Worksheet Functions 1 May 15th 06 05:36 PM
number returns only two decimal places after I change from text quale Excel Discussion (Misc queries) 5 December 8th 05 08:22 PM
I want to format a number cell without the decimal and without ro. LAM Excel Discussion (Misc queries) 8 April 20th 05 04:59 PM


All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"