Remove Dr Cr from numbers

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello guys
I have received a data sheet from one of my clients. The problem is I am not able to change the format of the figures and remove Dr & Cr. I require +ve and -ve numbers to finish my work. How is it possible to convert the custom format to number format. I tried selecting the whole column and selecting number format from the menu bar. But it is showing even the negative numbers as positive. Dr is a negative number and Cr is a positive number.
Query to remove Dr Cr from amount.xlsx
A
1Round Off
20.50 Cr
3
40.02 Dr
50.02 Cr
6
70.22 Dr
80.25 Dr
90.03 Dr
10
110.02 Cr
12
130.50 Cr
140.66 Cr
150.46 Dr
160.21 Dr
170.39 Dr
180.42 Dr
190.01 Dr
200.02 Dr
210.01 Cr
220.03 Cr
23
Sheet1
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You could do it with a formula:

=IFERROR(SUBSTITUTE(A2,"Cr","")*1,0)+IFERROR(SUBSTITUTE(A2,"Dr","")*-1,0)
 
Upvote 0
You could do it with a formula:

=IFERROR(SUBSTITUTE(A2,"Cr","")*1,0)+IFERROR(SUBSTITUTE(A2,"Dr","")*-1,0)
I am getting all zero.
Query to remove Dr Cr from amount.xlsx
AB
1Round Off
20.50 Cr0.00
30.00
40.02 Dr0.00
50.02 Cr0.00
60.00
70.22 Dr0.00
80.25 Dr0.00
90.03 Dr0.00
100.00
110.02 Cr0.00
120.00
130.50 Cr0.00
140.66 Cr0.00
150.46 Dr0.00
160.21 Dr0.00
170.39 Dr0.00
180.42 Dr0.00
190.01 Dr0.00
200.02 Dr0.00
Sheet1
Cell Formulas
RangeFormula
B2:B20B2=IFERROR(SUBSTITUTE(A2,"Cr","")*1,0)+IFERROR(SUBSTITUTE(A2,"Dr","")*-1,0)
 
Upvote 0
Query to remove Dr Cr from amount.xlsx
ABC
1Round Off
20.50 Cr0.003
30.000
40.02 Dr0.004
50.02 Cr0.004
60.000
70.22 Dr0.004
Sheet1
Cell Formulas
RangeFormula
B2:B7B2=IFERROR(SUBSTITUTE(A2,"Cr","")*1,0)+IFERROR(SUBSTITUTE(A2,"Dr","")*-1,0)
C2:C7C2=LEN(A2)
 
Upvote 0
Oh ok. So this is just formatting. If you click into cell A2 what do you see in the formula bar?
 
Upvote 0
If you right click then format cells you should see its custom formatted. Just remove that. It shouldnt matter to calculations by the way. Just use the numbers as normal. People have been known to type numbers in following the format which would be wrong. Click a few cells to see whats in the formula bar. They should all be just numbers without the text.
 
Upvote 0
Oh ok. So this is just formatting. If you click into cell A2 what do you see in the formula bar?
Sorry I thought it worked. But the all the numbers are still positive even the negative numbers are showing positive
 
Upvote 0
How do I change the format to all the columns and rows at a time, Have you any idea.? There are more than 1900 rows and 26 amount columns to change....
 

Attachments

  • Untitled.png
    Untitled.png
    12.5 KB · Views: 49
Upvote 0

Forum statistics

Threads
1,214,618
Messages
6,120,544
Members
448,970
Latest member
kennimack

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