Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default char to numeric value

Hi All
I want to convert 10+930.000 to numric value. I have imported
these number and it is saved as charecter. I want the + sign also in
between once it is converted. Thanks all for any help

Regards

Shanu

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default char to numeric value

Try this:

Sub convertality()
For Each r In Selection
r.Formula = "=" & r.Text
Next
End Sub

--
Gary''s Student - gsnu2007a


"sharmashanu" wrote:

Hi All
I want to convert 10+930.000 to numric value. I have imported
these number and it is saved as charecter. I want the + sign also in
between once it is converted. Thanks all for any help

Regards

Shanu


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default char to numeric value

It worked. Now is it possible to convert charecters with decimal eg:
"104+172.000" and ignore charecters without decimal eg: "104+180"

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default char to numeric value

Hi Gary
This conversion is taking out "10+" and giving me only remaining
Thanks again

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default char to numeric value

I want the + sign also in between ..
I'm guessing you want the + sign in front.

Sub Demo()
MsgBox DCFormat("10+930.000") ' gives +940.000
End Sub

Function DCFormat$(pStr$)
Dim f1%, iPos%
iPos = InStr(pStr, "+")
f1 = Val(Left$(pStr, iPos - 1)) + _
Val(Mid$(pStr, iPos + 1))
DCFormat = IIf(f1 0, "+", "") & Format(f1, "000.000")
End Function ' D-C

sharmashanu wrote:
Hi All
I want to convert 10+930.000 to numric value. I have imported
these number and it is saved as charecter. I want the + sign also in
between once it is converted. Thanks all for any help
Regards
Shanu



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default char to numeric value

Hey dave..
It did as you said.but i want the 10+ also.. These are survey points.
Thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default char to numeric value

Is it always a "+" sign?
Is the number before the "+" an integer? Range?
Is the number after the "+" always 3 decimal places? Range?
Do you want 3 decimal places in your output?
From "10+930.000" do you want "10+940.000"?
If not, what?
D-C

sharmashanu wrote:

Hi All
I want to convert 10+930.000 to numric value. I have imported
these number and it is saved as charecter. I want the + sign also in
between once it is converted. Thanks all for any help
Regards
Shanu

sharmashanu wrote:
Hey dave..
It did as you said.but i want the 10+ also.. These are survey points.
Thanks



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default char to numeric value

Unfortunately, nothing happened when I ran this.

"sharmashanu" wrote:

Hi All
I want to convert 10+930.000 to numric value. I have imported
these number and it is saved as charecter. I want the + sign also in
between once it is converted. Thanks all for any help

Regards

Shanu


Reply
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
FIND 1 char in cell of any 3 char =True Nastech Excel Discussion (Misc queries) 5 April 26th 08 02:17 PM
8500 cells with phone number(7 char.), wishing to add area code (10 char.) [email protected] Excel Discussion (Misc queries) 6 March 10th 06 05:13 PM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 3 December 30th 05 08:01 PM
How to removed the first three char and last char in XLS Lillian Excel Programming 1 December 21st 04 12:34 AM


All times are GMT +1. The time now is 12:01 AM.

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"