Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KI
 
Posts: n/a
Default Formatting Excel Worksheet

Please help.
I have a spreadsheet which has various negative numbers entered as follows:
e.g. 5.25-
0.32-
1,502.33- etc etc
Is there any way to format it or a formula which will change the above
numbers so that it is a negtive number
e.g. -5.25,
-0.32, -
1,502.33 etc etc
I have tried all the usual ways to format it but the numbers still remain as
5.25- etc etc
  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

if your number is in A1, then use this formula in B1

=IF(RIGHT(TRIM(A1),1)="-",-LEFT(A1,LEN(TRIM(A1))-1),A1)


"KI" wrote:

Please help.
I have a spreadsheet which has various negative numbers entered as follows:
e.g. 5.25-
0.32-
1,502.33- etc etc
Is there any way to format it or a formula which will change the above
numbers so that it is a negtive number
e.g. -5.25,
-0.32, -
1,502.33 etc etc
I have tried all the usual ways to format it but the numbers still remain as
5.25- etc etc

  #4   Report Post  
KI
 
Posts: n/a
Default

Thanks for your help.
Worked a treat.

"Duke Carey" wrote:

if your number is in A1, then use this formula in B1

=IF(RIGHT(TRIM(A1),1)="-",-LEFT(A1,LEN(TRIM(A1))-1),A1)


"KI" wrote:

Please help.
I have a spreadsheet which has various negative numbers entered as follows:
e.g. 5.25-
0.32-
1,502.33- etc etc
Is there any way to format it or a formula which will change the above
numbers so that it is a negtive number
e.g. -5.25,
-0.32, -
1,502.33 etc etc
I have tried all the usual ways to format it but the numbers still remain as
5.25- etc etc

  #5   Report Post  
KI
 
Posts: n/a
Default

Thank you.

"Don Guillett" wrote:

this should do it
Sub fixneg()
For Each c In Selection
If Right(c, 1) = "-" Then c.Value = "-" & Left(c, Len(c) - 1)
Next c
End Sub

--
Don Guillett
SalesAid Software

"KI" wrote in message
...
Please help.
I have a spreadsheet which has various negative numbers entered as

follows:
e.g. 5.25-
0.32-
1,502.33- etc etc
Is there any way to format it or a formula which will change the above
numbers so that it is a negtive number
e.g. -5.25,
-0.32, -
1,502.33 etc etc
I have tried all the usual ways to format it but the numbers still remain

as
5.25- etc etc






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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel opens with a Analysis folder istead of worksheet rantoine Excel Discussion (Misc queries) 7 March 29th 05 01:23 PM
Create New Microsoft Excel Worksheet Has 3 Sheets Bassam Setting up and Configuration of Excel 0 February 9th 05 08:51 PM
formatting when pasting into excel Don Hicks at MESD Excel Discussion (Misc queries) 1 February 8th 05 08:46 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 01:11 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"