#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Truncating Decimals

I have a macro whereby I have cells each a with number that could be upto 2
decimals in length. Example: A B C
8 5.6 7.25
Creating a variable accessing these cells the results is as follows:
8 5 7

WHAT DO I NEED TO DO TO MAINTAIN THOSE DECIMAL POSITIONS? i AM USING EXCEL
2007.

Thanks in Advance.....
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Truncating Decimals

What is the variable type used ('Integer' or 'Long').
Declare the variable as 'Variant' or 'Double' and try

or just try
Msgbox Range("A1")

If this post helps click Yes
---------------
Jacob Skaria


"RidgeView" wrote:

I have a macro whereby I have cells each a with number that could be upto 2
decimals in length. Example: A B C
8 5.6 7.25
Creating a variable accessing these cells the results is as follows:
8 5 7

WHAT DO I NEED TO DO TO MAINTAIN THOSE DECIMAL POSITIONS? i AM USING EXCEL
2007.

Thanks in Advance.....

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Truncating Decimals

I tried "Variant" and it worked perfectly... Thanks alot !!!!!

"Jacob Skaria" wrote:

What is the variable type used ('Integer' or 'Long').
Declare the variable as 'Variant' or 'Double' and try

or just try
Msgbox Range("A1")

If this post helps click Yes
---------------
Jacob Skaria


"RidgeView" wrote:

I have a macro whereby I have cells each a with number that could be upto 2
decimals in length. Example: A B C
8 5.6 7.25
Creating a variable accessing these cells the results is as follows:
8 5 7

WHAT DO I NEED TO DO TO MAINTAIN THOSE DECIMAL POSITIONS? i AM USING EXCEL
2007.

Thanks in Advance.....

Reply
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
Truncating cells Simon Excel Worksheet Functions 4 September 18th 07 03:00 PM
numbers truncating Sue Excel Discussion (Misc queries) 3 January 25th 07 12:52 PM
truncating series Michael Charts and Charting in Excel 0 May 31st 06 11:41 AM
truncating text scott_cairns Excel Discussion (Misc queries) 7 May 30th 06 01:51 PM
Truncating numbers Susana C via OfficeKB.com Excel Worksheet Functions 1 May 8th 06 04:42 PM


All times are GMT +1. The time now is 09:31 PM.

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

About Us

"It's about Microsoft Excel"