I have a cell with 5 digits in it ie 15555
I wish to change it to 1.5555
There are over 10,000 cells that I need to do this to. Is there a macro command that will allow me to
select all cells in range
insert decimal point after first digit
I have a cell with 5 digits in it ie 15555
I wish to change it to 1.5555
There are over 10,000 cells that I need to do this to. Is there a macro command that will allow me to
select all cells in range
insert decimal point after first digit
in a cell put .0001 and Edit, Copy the cellOriginally Posted by alleyb
Select the range and Edit, Paste Special = Multiply
hth
---
note, you can select a range by typing the address in the Name box, ie C1:C10000 <Enter>
Last edited by Bryan Hessey; 10-11-2006 at 06:52 AM.
Hi Alley
Here is a different flavor
Sub add_decimal()
'********
Dim Cell As Range
Dim R As Range
Set R = ActiveSheet.UsedRange
ActiveSheet.Unprotect
For Each Cell In R
original_value = Cell.Value
first_number = Left(original_value, 1)
last_number = Right(original_value, 4)
new_value = first_number & "." & last_number
Cell.Value = new_value
Next
'*********
End Sub
Thankyou soooooooo much. I was able to use the devide function as well. So easy when one knows how shows how much i know about maths. THANKYOU again
I shall play with the other variations posted by Jetted and OldChippy as they have read my mind re length of digits as well.
almost the same situation as alleyb,
but mine is adding a decimal point in a column of cells.
insert a decimal point after the second number, from the right.
ie. 123456 -> 1234.56, 78900 -> 789.00. (in laymans terms).
thanks.
Hi alleyb,Originally Posted by alleyb
If the length of your digits vary in length (so to speak), then you could use this, assumming your data is in A1:A10000
=VALUE(LEFT(A1,1)&"."&RIGHT(A1,LEN(A1)-1))
Then drag down
oldchippy![]()
rudygs,
Welcome to the Forum, unfortunately:
Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
Would you like to say thanks? Please click the: "Add Reputation" button, on the grey bar below the post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks