Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text to Numbers

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,486
5
38
US

I have some code to put text into cells like this:
[tt]
Range("A" & intEcRow & ":" & strL & intEcRow).Value = strLine
[/tt]
where strLine as an array of values declared as String.

One of the columns get the values of:
[tt]
Total

1.11
1.1
1.0
1.01
See Proposal
See Proposal
1.10
0 [/tt]
and the column is formatted as Text because user wants to see 1.0 or 2.00

Now the user wnats to have the same information on another sheet and wants to see the numbers as numbers.

How can I convert:[tt]
'1.11
'1.1
'1.0
'1.01
'See Proposal
'See Proposal
'1.10
'0 [/tt]
(Single quotes are there becasue it is text)
to numbers:
[tt]
Total
1.11
1.1
1
1.01
See Proposal
See Proposal
1.10
0
[/tt]

I just want to adjust the column with the text to be numbers, I don't want to Copy/Paste special

Have fun.

---- Andy
 


A

Don't know why you posted here.

Just "transfer" the data to another sheet. Here I have Sheet2 as the other.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim t As Range
    
    For Each t In Target
        If Not Intersect(t, Columns(1)) Is Nothing Then
            Sheet2.Cells(t.Row, "A").Value = t.Value
        End If
    Next
End Sub

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

Sorry Skip, wrong forum - no wonder I could not find this post...

It was answere by you here.

Have fun.

---- Andy
 
Actually I answered the question differently, because here you stated, "I don't want to Copy/Paste special."

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top