PC Review


Reply
Thread Tools Rate Thread

Decimal Dilemma

 
 
=?Utf-8?B?QXJ0dXJv?=
Guest
Posts: n/a
 
      29th Jan 2007
I’m looping through a column of numbers. Each number is stored in a
variable, Y_CellTest, as that row is dealt with and a comparative test is
performed. The value of Y_CellTest can go out a varying number of positions
to the right of the decimal point. How do I alter that variable Y_CellTest,
to read only X numbers of places to the right of the decimal point?
Currently the line reads Y_CellTest = Worksheets(2).Cells(Loop_rO,
coLArray(X_col)). Y_CellTest = 43.3762286964325 but I want it to read only
say 4 places to the right of the decimal point, Y_CellTest = 43.3762.

Appreciatively,
Arturo
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QXJ0dXJv?=
Guest
Posts: n/a
 
      29th Jan 2007
Got it:

Y_CellTest = Round(Worksheets(2).Cells(Loop_rO, coLArray(X_col)), 4)

"Arturo" wrote:

> I’m looping through a column of numbers. Each number is stored in a
> variable, Y_CellTest, as that row is dealt with and a comparative test is
> performed. The value of Y_CellTest can go out a varying number of positions
> to the right of the decimal point. How do I alter that variable Y_CellTest,
> to read only X numbers of places to the right of the decimal point?
> Currently the line reads Y_CellTest = Worksheets(2).Cells(Loop_rO,
> coLArray(X_col)). Y_CellTest = 43.3762286964325 but I want it to read only
> say 4 places to the right of the decimal point, Y_CellTest = 43.3762.
>
> Appreciatively,
> Arturo

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text box formatted to General Number with 2 decimal places NOTallowing the decimal place. p-rat Microsoft Access Form Coding 3 14th Jan 2008 05:20 PM
Make decimal work properly in fixed decimal entry in Excel 2003. =?Utf-8?B?am9obmdpaWk=?= Microsoft Excel Crashes 0 12th Apr 2006 06:05 AM
WindowsXP and IE Dilemma Dilemma Dilemma, Please Help!! =?Utf-8?B?Qk9CMjI3?= Windows XP Configuration 0 4th Apr 2006 05:52 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Microsoft Excel Misc 3 18th Mar 2006 06:20 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. =?Utf-8?B?U1VLWUtJVFRZ?= Microsoft Excel Misc 3 6th Jul 2005 01:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:29 PM.