Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula Assistance Financial system export

I have a listing of over 2500 numbers that I exported from our financial
system. Some of the cells have a CR after the number standing for credit
balance instead of a negative. Some of the numbers are positive and have
nothing else in the cell besides the number. How can I change the numbers
with a CR to show paranthesis around the number instead of the CR? I would
be happy to forward you a sample.

We are using Office 2007.
  #2   Report Post  
Junior Member
 
Posts: 9
Default

Quote:
Originally Posted by toysam View Post
I have a listing of over 2500 numbers that I exported from our financial
system. Some of the cells have a CR after the number standing for credit
balance instead of a negative. Some of the numbers are positive and have
nothing else in the cell besides the number. How can I change the numbers
with a CR to show paranthesis around the number instead of the CR? I would
be happy to forward you a sample.

We are using Office 2007.
Toysam

This is a common problem with data from finance systems. Try the code below by pasting it in your macro visual basic editor

You will need to change 3 things

1 In the first line the sheetID from "sheet1" if yours differs
2 Also in line 1: the range"b2:b80000" if your data is in a different column to "b"
3 The row 3 lines from bottom "B:B" to whatever column your data is in

Then run as a macro


Sub ChangeCR()


For Each cell In Worksheets("Sheet1").Range("b2:b80000").Cells
If UCase(Right(cell.Value, 2)) = "CR" Then
cell.Value = -Val(Left(cell.Value, Len(cell.Value) - 2))
Else
End If

Next cell
Columns("B:B").Select
Selection.NumberFormat = "0.00;(0.00)"
Range("B2").Select

End Sub
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
Financial formula Karen Excel Worksheet Functions 6 June 24th 09 01:25 PM
preparation of financial performance and financial position ? kay New Users to Excel 1 March 19th 09 07:22 AM
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
Which financial formula do I use? Ted-im New Users to Excel 0 October 10th 06 06:58 AM
Assistance with Formula Ben Excel Worksheet Functions 3 June 15th 06 05:11 PM


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