LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default forcing cell format to be negative currency?

Hi Jouiooui,

Try:
'=============
Public Sub Tester()
Dim Rng As Range
Dim rCell As Range

Set Rng = Range("B85:B86")

For Each rCell In Rng.Cells
With rCell
.Value = -Abs(.Value)
.Font.Name = "Arial"
.Font.Bold = True
.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
End With
Next rCell

End Sub
'<<=============


---
Regards,
Norman



"JOUIOUI" wrote in message
...
Hi Norman,

Thanks for this code, it formats the cell, however it doesn't change the
data to be a negative. I'm using the currency in those cells in an
accounting balance sheet and I need it to be a negative. Is there a way to
automatically put a - sign in front of any currency value copied into that
cell. Thanks again.



 
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
How to add new currency Symbol in Format/Cell/Currency NOORZAD Excel Discussion (Misc queries) 2 June 22nd 09 07:59 AM
Format Currency Cell Yossy Excel Worksheet Functions 6 October 28th 08 02:30 PM
How to set 2 currency format in 1 cell?? Lee Excel Discussion (Misc queries) 2 April 22nd 08 07:29 PM
Format Currency in-cell Lyners Excel Worksheet Functions 2 September 24th 07 06:22 PM
forcing cell format type in excel using com? Daryl Excel Programming 1 April 19th 06 02:43 PM


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