Writing a Macro to add decimal

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to add a decimal to each number in a column of figures. For examples
7254
6523
8945
12546

I need to put a decimal point where the "thousands" would begin.
e.g:
7254 - 7.254

I want to write a macro that will go to the end of each figure, go back
three spaces and put a decimal there. Is this possible? How do I do it?
HELP!!!!!!!
 
You don't, you simply put 1000 in an empty cell, copy that cell, select all
your data and do edit / paste special / divide, and then delete the 1000.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------­------------------------------­----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------­------------------------------­----------------
 
Does it have to be a macro?

You can put .001 into an empty cell, copy it, select all the numbers, and use
Edit->Paste Speical->Values->Multiply



If they
 
Good evening CindyW

Something like this would do it. It doesn't actually count back three
digits from the end, but divides the number by 1000 - the end result
should be the same. Just remember to highlght the ange you want to
affect before running it.

Sub Thousands()
For Each num In Selection
num.Formula = num.Formula / 1000
Next num
End Sub

HTH

DominicB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top