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
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Why is row 2, 3 and 13 10 times larger than the value in column A, is that just a typo? And do you want a balnk returned if it is a debit or just its normal value?
 
Upvote 0
Try in B2

=IF(RIGHT(A2,2)="Cr",LEFT(A2,LEN(A2)-3)*-1,"")

Thanks Sir, for Quick Reply

I have to Forget the Cells are Format as 0.00" dr" and 0.00" Cr"

After Putting Your Formula All the Cells in B2 are Blanks


Excel Workbook
AB
1Balance*
230 Cr*
350 Cr*
43500 Cr*
550 Cr*
63300 Cr*
73333 Cr*
81 Cr*
970 Cr*
103500 Cr*
113500 Cr*
123312 Cr*
1360 Cr*
1490 Cr*
153200 Cr*
1684 Cr*
1715 Cr*
183150 Cr*
Sheet2
 
Upvote 0
Why is row 2, 3 and 13 10 times larger than the value in column A, is that just a typo? And do you want a balnk returned if it is a debit or just its normal value?

Yes Sir, its Just Typo

I want to Delete the CR and convert into Negative Value

For "DR", Just Normal Value
 
Upvote 0
It worked for me. Try this alternative

=IF(RIGHT(A2,2)="Cr",SUBSTITUTE(A2," Cr","")*-1,"")
 
Upvote 0
It worked for me. Try this alternative

=IF(RIGHT(A2,2)="Cr",SUBSTITUTE(A2," Cr","")*-1,"")

I am sorry but its Not Working for me

I think the Problem in CR and DR, in Mine Data CR and DR not Reflect in the Formula Bar, Only Show the Figure, and Your Formula show ="CR"


Excel Workbook
AB
1BalanceYour Formula
230 DR*
350 DR*
43500 DR*
550 DR*
63300 DR*
73333 DR*
81 DR*
970 DR*
103500 DR*
113500 DR*
123312 DR*
1360 DR*
1490 DR*
153200 DR*
1684 DR*
1715 DR*
183150 DR*
Sheet1


I don't Know where I am Wrong
 
Upvote 0
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 />
 
Upvote 0
Hello Hardeep,

See the post #7, Kris's Suggestion. Select your range >> Format Cells >> Custom.

#,##0;[Red](#,##0)
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,752
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