#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Conversion

Hi bodhisatvaofboogie

Select the cells and run this macro

Sub TrailingMinus()
' = = = = = = = = = = = = = = = =
' Use of CDbl suggested by Peter Surcouf
' Program by Dana DeLouis,
' = = = = = = = = = = = = = = = =
Dim rng As Range
Dim bigrng As Range

On Error Resume Next
Set bigrng = Cells.SpecialCells(xlConstants, xlTextValues).Cells
If bigrng Is Nothing Then Exit Sub

For Each rng In bigrng.Cells
rng = CDbl(rng)
Next
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl



"bodhisatvaofboogie" wrote in
message ...
I am writing a macro that pulls data from one system into excel then
formats
it. One problem I have come across is this:

Some number data that is brought in has the "-" sign at the back, example:
17.25-

I want it to be:
-17.25

What is a VBE line of code to have that cell changed in that manner?

The cells that have those numbers in them end up not being viable for
calculating into a sum total unless I find a way to switch them which ends
up
throwing off my final calculations. THANKS FOR THE HELP!!!




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
Conversion barrowhill Excel Discussion (Misc queries) 7 January 19th 09 12:03 AM
CONVERSION L8F8AT48 Excel Discussion (Misc queries) 1 May 11th 07 05:47 PM
ESN conversion jay-rod Excel Worksheet Functions 2 April 29th 07 11:36 PM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
E12 conversion Valex Excel Programming 1 August 5th 04 09:20 AM


All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"