+ Reply to Thread
Results 1 to 17 of 17

How to extract capitalize letter text at certain position

  1. #1
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    How to extract capitalize letter text at certain position

    I have only 2 columns, the first column DESCRIPTION has a long delimited data in it. While the second column AMOUNT is text with DB/CR at the end of the text (such as 12,000.00 DB).

    I download bank transaction history and would like to extract the name of customers which is located at the end of the Description line. Some lines have one or two words preceding the names of the customer. How can I extract the all capitalize Names.

    I also need to extract the amount transferred from text and convert it into numbers.

    DESCRIPTION AMOUNT
    TRSF E-BANKING DB 2701/FTSCY/WS95051 12000.00 JAMES BOND 12,000.00 DB
    TRSF E-BANKING CR 2701/FTSCY/WS95051 10000.00 deposit CHRISTINE 10,000.00 CR
    TRSF E-BANKING CR 2701/FTSCY/WS95051 25025.00 AMANDA B GREEN 25,025.00 CR
    TRSF E-BANKING CR 2701/FTSCY/WS95051 5000.00 msn1888 JOSH BROWN 5,000.00 CR
    TRSF E-BANKING CR 2701/FTSCY/WS95051 1000.00 topup CHRISTINE 1,000.00 CR

    Result wanted:

    CUSTOMER DEBIT CREDIT
    JAMES BOND 12,000
    CHRISTINE 10,000
    AMANDA B GREEN 25,025
    JOSH BROWN 5,000
    CHRISTINE 1,000
    TOTAL 12,000 41,025

    Please find the attached file. Thanks Book1.xlsx
    Last edited by harimin; 02-03-2016 at 11:25 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to extract capitalize letter text at certain position

    I have a question and a request:

    The question is will the amount in Column B always appear in Column A?

    Can you attach this data in a sample workbook? Thanks.

  3. #3
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: How to extract capitalize letter text at certain position

    Yes, the amount in column B will always appear in column A.

    Please follow this link to download the sample file

    http://www.filedropper.com/filemanag...fc4c0e3a9895ff

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How to extract capitalize letter text at certain position

    Please upload your file to the forum. Not all members are able - or willing - to access file-hosting sites
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: How to extract capitalize letter text at certain position

    Please find attached file. Book1.xlsx

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to extract capitalize letter text at certain position

    Hi harmin and welcome to the forum,

    To get the names out:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    to get debit:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    to get credit:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: How to extract capitalize letter text at certain position

    The debit credit formula work fine, but the formula to extract name doesn't work properly. The names of the customers are all the capitalized letter at the end of the line. TRSF E-BANKING CR 2701/FTSCY/WS95051 10000.00 deposit CHRISTINE, I want to extract "CHRISTINE" only, not "deposit CHRISTINE". For line 4: TRSF E-BANKING CR 2701/FTSCY/WS95051 5000.00 Msn1888 JOSH BROWN 5,000.00 CR, it should extract "JOSH BROWN", instead of "Msn1888 JOSH BROWN". Thanks.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to extract capitalize letter text at certain position

    VBA solusion, if you like
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to extract capitalize letter text at certain position

    Sorry harimin. Here is a new formula that should give the results you want.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B C
    10 CUSTOMER DEBIT CREDIT
    11 JAMES BOND 12,000
    12 CHRISTINE 10,000
    13 AMANDA B GREEN 25,025
    14 JOSH BROWN 5,000
    15 CHRISTINE 1,000
    16 12,000 41,025
    Last edited by AlKey; 02-05-2016 at 10:21 AM.

  10. #10
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: How to extract capitalize letter text at certain position

    @alkey: I still cannot extract this line properly: For line 4: TRSF E-BANKING CR 2701/FTSCY/WS95051 5000.00 Msn1888 JOSH BROWN 5,000.00 CR, it should extract "JOSH BROWN", instead of "Msn1888 JOSH BROWN". Another sample with "5000.00 dePosit JOSH BROWN", the formula still extract "Posit JOSH BROWN, instead of "JOSH BROWN".

    @jindon: thanks your VBA works great. I am not familiar with VBA though, so I find it difficult to customize the code when there are changes in locations of the rows and columns. I used my real worksheet and tried to change your code for a couple of times but failed. Please help, thanks.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to extract capitalize letter text at certain position

    harimin

    You are welcome and glad you like it.

    If you upload a workbook with the correct data layouts and the position of the output, I can show you how.

  12. #12
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: How to extract capitalize letter text at certain position

    Please find atttached real layout from the bank. Thank. Extract Names.xlsx
    Last edited by harimin; 02-07-2016 at 08:08 PM. Reason: wrong attached file

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to extract capitalize letter text at certain position

    Some miss-spelled customer and all in Caps, so can not recognize proper cust name.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  14. #14
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to extract capitalize letter text at certain position

    Agreed with jindon. There is no way to distinguish names from some other words in CAPS. See attached file with results in Col F. Any solution whether by VBA or formula cannot be 100% accurate.
    Attached Files Attached Files

  15. #15
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to extract capitalize letter text at certain position

    This is as close as I can come. Array entered.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulae array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Dave

  16. #16
    Registered User
    Join Date
    01-27-2013
    Location
    jakarta
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: How to extract capitalize letter text at certain position

    All three answers from Jindon, AlKey and FlameRetired work great! Many thanks for your help

  17. #17
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to extract capitalize letter text at certain position

    You're welcome. Glad to help and thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Capitalize first letter of every word
    By Steve1960 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-17-2013, 04:41 PM
  2. Capitalize all first letter
    By CoachBarker in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-07-2013, 12:25 PM
  3. [SOLVED] Only Capitalize First Letter & Delete Last Name
    By zulhfreelancer in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 7
    Last Post: 12-11-2012, 02:16 AM
  4. [SOLVED] Capitalize first letter in a cell
    By oskie89 in forum Excel General
    Replies: 4
    Last Post: 07-31-2012, 06:48 PM
  5. Capitalize first letter
    By randall78 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-14-2012, 03:56 AM
  6. Capitalize first letter of every word
    By inspirone1505 in forum Excel General
    Replies: 5
    Last Post: 02-20-2007, 03:06 AM
  7. Replies: 7
    Last Post: 02-19-2007, 12:17 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1