WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Text to number conversion with trailing -

 
   Home -> Office -> General Discussions RSS
Next:  Pivot Tables and Fiscal Year  
Author Message
wynand

External


Since: Jan 28, 2008
Posts: 36



(Msg. 1) Posted: Tue Nov 03, 2009 10:30 pm
Post subject: Text to number conversion with trailing -
Archived from groups: microsoft>public>excel>misc (more info?)

I would like to convert 1.234,00- to -1,234.00 for calculatation and
accounting purposes.
I received the formula for the trailing -:
=IF(TRIM(RIGHT(A1,1))="-","-"&SUBSTITUTE(TRIM(A1),"-",""),TRIM(A1))
The decimal comma problem can be corrected with a long edit/replace excercise:
, to x and . to y and then replace the x and y again with the correct
decimal and comma.

Can anyone help with one formula or VBA to do this all at once? And can such
a formula cater for negative and positive numbers?
Back to top
Login to vote
Jacob Skaria

External


Since: Mar 15, 2009
Posts: 231



(Msg. 2) Posted: Tue Nov 03, 2009 10:37 pm
Post subject: RE: Text to number conversion with trailing - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

--Select the range
--Hit Ctrl+H. Find what: , (comma) Replace with: leave blank and replace all
--From menu select Data>Text to Columns>Next>Next
--From 'Convert text to columns wizard Step3 of 3' hit 'Advanced' button.
Make sure you have checked 'trailing minus for negative numbers' and hit OK.
--Hit finish

If this post helps click Yes
---------------
Jacob Skaria


"wynand" wrote:

> I would like to convert 1.234,00- to -1,234.00 for calculatation and
> accounting purposes.
> I received the formula for the trailing -:
> =IF(TRIM(RIGHT(A1,1))="-","-"&SUBSTITUTE(TRIM(A1),"-",""),TRIM(A1))
> The decimal comma problem can be corrected with a long edit/replace excercise:
> , to x and . to y and then replace the x and y again with the correct
> decimal and comma.
>
> Can anyone help with one formula or VBA to do this all at once? And can such
> a formula cater for negative and positive numbers?
Back to top
Login to vote
B. R.Ramachandran

External


Since: Mar 07, 2006
Posts: 14



(Msg. 3) Posted: Wed Nov 04, 2009 3:52 pm
Post subject: RE: Text to number conversion with trailing - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

Try the formula,

=IF(ISNUMBER(FIND("-",A1)),"-","")&TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,".","x"),",","."),"x",","),"-",""))

Please click "Yes" if this is helpful.

Regards,
B. R. Ramachandran

"wynand" wrote:

> I would like to convert 1.234,00- to -1,234.00 for calculatation and
> accounting purposes.
> I received the formula for the trailing -:
> =IF(TRIM(RIGHT(A1,1))="-","-"&SUBSTITUTE(TRIM(A1),"-",""),TRIM(A1))
> The decimal comma problem can be corrected with a long edit/replace excercise:
> , to x and . to y and then replace the x and y again with the correct
> decimal and comma.
>
> Can anyone help with one formula or VBA to do this all at once? And can such
> a formula cater for negative and positive numbers?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support