PC Review


Reply
Thread Tools Rate Thread

char to numeric value

 
 
sharmashanu
Guest
Posts: n/a
 
      5th Nov 2007
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 With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      5th Nov 2007
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
>
>

 
Reply With Quote
 
sharmashanu
Guest
Posts: n/a
 
      5th Nov 2007
It worked. Now is it possible to convert charecters with decimal eg:
"104+172.000" and ignore charecters without decimal eg: "104+180"

 
Reply With Quote
 
sharmashanu
Guest
Posts: n/a
 
      5th Nov 2007
Hi Gary
This conversion is taking out "10+" and giving me only remaining
Thanks again

 
Reply With Quote
 
sharmashanu
Guest
Posts: n/a
 
      5th Nov 2007
Hey dave..
It did as you said.but i want the 10+ also.. These are survey points.
Thanks

 
Reply With Quote
 
Dave D-C
Guest
Posts: n/a
 
      5th Nov 2007
>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 =----
 
Reply With Quote
 
Dave D-C
Guest
Posts: n/a
 
      5th Nov 2007
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 =----
 
Reply With Quote
 
=?Utf-8?B?TGFkeW11Y2s=?=
Guest
Posts: n/a
 
      5th Nov 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to permanently delete char char char char style in MS Word? =?Utf-8?B?Q3Jpcw==?= Microsoft Word Document Management 6 12th Jun 2011 09:47 PM
Check numeric char Kash Microsoft Excel Programming 5 22nd May 2010 04:28 AM
How to delete numeric characters in a cell with alpha numeric char Zak Microsoft Excel Programming 1 5th May 2010 04:06 PM
Only numeric char. is missing in snapshot file (*.snp) Albert Microsoft Access Form Coding 4 5th Feb 2004 07:27 PM
Only numeric char. is missing in snapshot file (*.snp) Albert Microsoft Access VBA Modules 4 5th Feb 2004 07:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:51 PM.