how would i separate these entries from my credit card statement into coherent columns?

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
840
Office Version
  1. 2013
Platform
  1. Windows
For some reason my credit card doesnt give excel statements. How would I separate gibberish like this into columns? I'd like 4 columns please.
I used LEFT, MID, RIGHT, FIND commands for the first 3 columns, but then I got stuck.

Jan 07 Jan 07 GOOGLE *OkCupid g.co/helppay#NS 2.52
Apr 01 Apr 02 BANK PMT/PAIEMENT BCIC -200.00
Mar 23 Mar 25 TIM HORTONS QUEBEC ON 3.03
Apr 10 Apr 10 INTEREST CHARGES 15.18
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Perhaps:


Book1
ABCDE
1Jan 07 Jan 07 GOOGLE *OkCupid g.co/helppay#NS 2.52Jan 07Jan 07GOOGLE *OkCupid g.co/helppay#NS2.52
2Apr 01 Apr 02 BANK PMT/PAIEMENT BCIC -200.00Apr 01Apr 02BANK PMT/PAIEMENT BCIC-200
3Mar 23 Mar 25 TIM HORTONS QUEBEC ON 3.03Mar 23Mar 25TIM HORTONS QUEBEC ON3.03
4Apr 10 Apr 10 INTEREST CHARGES 15.18Apr 10Apr 10INTEREST CHARGES15.18
Sheet6
Cell Formulas
RangeFormula
B1=LEFT(A1,6)
C1=MID(A1,8,6)
D1=MID(A1,15,LEN(A1)-15-LEN(TEXT(E1,"#.00")))
E1=RIGHT(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1))+0
 
Upvote 0
thank you so much!

can you explain this part of the code in D1? this is where I got stuck when I was designing the formulas myself

LEN(TEXT(E1,"#.00"))

 
Upvote 0
In order to make the E column numeric, I added 0 to the string. This converts a string number to a real number, allowing you to sum up that column if you wish. But if you do that, it could convert 200.00 to just 200 (no cents). The D1 formula starts at position 15, and then figures out how many characters to extract. It subtracts the first 15 characters, then has to subtract the number of characters from column E. But if the E formula converts 200.00 to 200, then I can't just do a LEN(E1), because it will be off by 3 characters. So I use the TEXT function to make sure the length I calculate is the original length, not the shorter length.

If you take the +0 off the E1 formula, you can remove the TEXT from the D1 formula, but then you can't add up column E.

Make sense?
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,412
Members
448,960
Latest member
AKSMITH

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