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..... |
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..... |
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..... |
All times are GMT +1. The time now is 09:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com