Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Text to number conversion with trailing -

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Text to number conversion with trailing -

--Select the range
--Hit Ctrl+H. Find what: , (comma) Replace with: leave blank and replace all
--From menu select DataText to ColumnsNextNext
--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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 61
Default Text to number conversion with trailing -

Hi,

Try the formula,

=IF(ISNUMBER(FIND("-",A1)),"-","")&TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTI TUTE(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?

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
Issue with Number Conversion to text Yuvaraj Mani Excel Worksheet Functions 0 October 15th 09 04:48 PM
Number conversion to text in Ms excel bafarooqi Excel Worksheet Functions 2 November 20th 08 08:40 AM
Text to Number conversion ALLYANA New Users to Excel 6 October 16th 06 03:33 PM
PREVENT conversion of text to number? celticvalley Excel Discussion (Misc queries) 2 August 17th 05 02:52 PM
Conversion of a Number into English Text Nasir Ali Excel Worksheet Functions 1 July 28th 05 08:50 AM


All times are GMT +1. The time now is 07:30 PM.

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"