CELL FORMAT - IF CONDITION

Suresh Kusunuri

Board Regular
Joined
Dec 28, 2007
Messages
138
Office Version
  1. 2007
Platform
  1. Windows
My Cell Format is ""0.00" Cr". But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other programme. Now, I want to get the value from this cell to another cell based on “Cr” by using IF condition. But “Cr” is not appeared in the cell for applying formula. Can anybody help me?

Thanks
Suresh
 
Save the Excel workbook as CSV and open the file.
You will see Cr and Dr attached with Figures Then use if function there
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi @MARK858 The formatting is generated by an accounting software. Dr means Debit and Cr means credit entries
 
Upvote 0
There are 2 types of values in the same column. 1 is positive and another is negative. "Dr" stands for positive and "Cr" stands for Negative. All are numeric.
 
Upvote 0
Try Post 11
Brings it back as text for me and so doesn't allow the sum, would have to amend the formula to remove the Cr for it to work (i.e. =IF((RIGHT(A1,2)="Cr"),B1+LEFT(A1,LEN(A1)-2),"").....)

xxxx.csv
ABC
1123.00 Cr145#VALUE!
xxxx
Cell Formulas
RangeFormula
C1C1=IF((RIGHT(A1,2)="Cr"),(B1+A1),"")
 
Last edited:
Upvote 0
I meant "Dr" or "Cr" which were only visible in excel as it was a custom formatting. converting the data into CSV will hard code the "Dr" or "Cr" in the cell so you can use the column and use the data as an helper column to derive what is debit and what is credit
 
Upvote 0
You don't need a helper column with the CSV method, just an amendment to the formula like...

xxxx.csv
ABC
1123.00 Cr145268
xxxx
Cell Formulas
RangeFormula
C1C1=IF((RIGHT(A1,2)="Cr"),B1+LEFT(A1,LEN(A1)-2),"")
 
Upvote 0
A
Thank you Mr. Punit, But my purpose is not served.

After saving a copy of your file as CSV open the file and paste the column which you require to the next of the column in your main excel file. Now you have a reference cell which has debit and cr hard coded in cell. Now your formula will work keeping cell reference for Dr and Cr in the helper column
 
Upvote 0
You don't need a helper column with the CSV method, just an amendment to the formula like...

xxxx.csv
ABC
1123.00 Cr145268
xxxx
Cell Formulas
RangeFormula
C1C1=IF((RIGHT(A1,2)="Cr"),B1+LEFT(A1,LEN(A1)-2),"")


But the probelm with CSV file is when it is saved it removes all the formula and Additional sheet.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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