Convert "CR" Into Negative Numbers

hardeep.kanwar

Well-known Member
Joined
Aug 13, 2008
Messages
693
Dear All,

I have Account Data with "DR" & "CR" Format


Excel Workbook
A
1Balance
230.00 Cr
350.00 Cr
43500.00 Cr
550.00 Cr
63300.00 Cr
73333.00 Cr
80.80 Dr
970.00 Dr
103500.00 Dr
113500.00 Dr
123312.00 Dr
1360.00 Cr
1490.00 Cr
153200.00 Cr
1684.00 Dr
1715.00 Cr
183150.00 Cr
Sheet1



What i Need to Convert "CR" Numbers Into Negative

Excel Workbook
AB
1BalanceExpected Result
230.00 Cr(300)
350.00 Cr(500)
43500.00 Cr(3500)
550.00 Cr(50)
63300.00 Cr(3300)
73333.00 Cr(3300)
80.80 Dr
970.00 Dr
103500.00 Dr
113500.00 Dr
123312.00 Dr
1360.00 Cr(600)
1490.00 Cr(90)
153200.00 Cr(3200)
1684.00 Dr
1715.00 Cr(15)
183150.00 Cr(3150)
Sheet1



Is it Possible with Formula


Thanks In Advance
 
Hi

The data in your last table does not have any CR. Also, SUBSTITUTE is case sensitive.

Try

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="10px" style="background-color: #DAE7F5" /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style=";">Balance</td><td style=";">Formula</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style=";">30 CR</td><td style="text-align: right;;">-30</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style=";">50 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style=";">3500 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style=";">50 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style=";">3300 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style=";">3333 CR</td><td style="text-align: right;;">-3333</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style=";">1 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style=";">70 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style=";">3500 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style=";">3500 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style=";">3312 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style=";">60 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style=";">90 CR</td><td style="text-align: right;;">-90</td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style=";">3200 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style=";">84 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style=";">15 DR</td><td style=";"></td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style=";">3150 DR</td><td style=";"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B2</th><td style="text-align:left">=IF(<font color="Blue">RIGHT(<font color="Red">A2,2</font>)="Cr",SUBSTITUTE(<font color="Red">LOWER(<font color="Green">A2</font>)," cr",""</font>)*-1,""</font>)</td></tr></tbody></table></td></tr></table><br />

No, Still Not Working

[https://spreadsheets.google.com/ccc?key=0AgAzPQzqieBPdFpoY0RZbzA5czB6QTFBSHJmTHJLZmc&hl=en&pli=1#gid=0

I have Attached the Link,

I want to Convert Yellow colored Column
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I assume your data column (A) is just numbers but formatted 0.00" CR";0.00" DR" as a custom format.

If that is the case all you should need is your output column formatted as 0.00;[Red](0.00) and the formula =IF(A1<0,A1*-1,"")
 
Upvote 0
I assume your data column (A) is just numbers but formatted 0.00" CR";0.00" DR" as a custom format.

If that is the case all you should need is your output column formatted as 0.00;[Red](0.00) and the formula =IF(A1<0,A1*-1,"")

Yes, this is the Situation, but its not working


Excel Workbook
BC
5BalanceFormat As 0.00;[Red](0.00)
63500.00 Cr 
799270.00 Dr
899270.00 Dr 
9500.00 Cr
10 
1110000.00 Cr
1215309.00 Dr
1337618.40 Dr
1428090.00 Dr
1527940.00 Dr
Sundry Debtors
 
Upvote 0
You say that you are using two custom formats with either Cr or Dr on the end. How do you distinguish between the two types of values? What does the data look like without the formatting?
 
Upvote 0
I've looked at your spreadsheet online at Google Docs. It seems that your data column B is numbers but without + or - value. If I change the format of the column to Normal both the CR and DR numbers are shown as positive (+).

On Google Docs I can't see the actual custom formatting of the column B, is it a Conditional Format based on the value in some other column?
 
Upvote 0
I've looked at your spreadsheet online at Google Docs. It seems that your data column B is numbers but without + or - value. If I change the format of the column to Normal both the CR and DR numbers are shown as positive (+).

On Google Docs I can't see the actual custom formatting of the column B, is it a Conditional Format based on the value in some other column?

Yes, When i change the Format of the column to Normal both CR and DR Numbers are Shown as Positive (+)

The Column have Normal Custom Format Like ""0.00" Cr" and ""0.00" Dr"

Two Different Type of Formating

Actually, This data is Export from Our Accounting Software
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top