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: 40
Default How to check the decimal number of each cells vaue in the column

Hi all,

As refer to my pervious post, I would like to use Macro VBA to check the
last digit (1 to 9) of the
cell value automatically?

My code as below: (may be it is complicated coding)

For Each Col In Range("A2:A9999")

If Col.Value < "" Then
If Col.Value 10 And Col.Value <= 9999 Then
Ans = Col.Value Mod 10
If Ans < 0 Then
Col.Value = Col.Value * 10
Else
Col.Value = Col.Value
End If
End If
End If

Next Col

e.g.
Cell A1 = 21, 22 ........, 29 then it will be multiply by 10
Cell A2 = 201, 202, ........., 209 then it will be multiply by 10


However, how can I check with the data which is decimal number too, such
that 3.9 , 33.9 ......................... convert to 390,
3390...............................?

Thanks
tlee

 
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
How to check the last digit of each cells vaue in the column tlee Excel Programming 8 June 5th 09 02:18 AM
I need to check for a number in a column before continuing on Don M. Excel Programming 1 April 30th 09 08:06 PM
How to check the decimal point of floating number using macro??? Jac Excel Programming 4 May 16th 07 06:36 PM
How can I check for a duplicate number in a column in Excel? kkinner Excel Discussion (Misc queries) 2 August 24th 06 03:44 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM


All times are GMT +1. The time now is 10:36 PM.

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"