+ Reply to Thread
Results 1 to 5 of 5

Split string based on character count

  1. #1
    Registered User
    Join Date
    11-11-2013
    Location
    Davao, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Split string based on character count

    Hi all,

    Please help me on this:

    I want to have a formula in cell “B10” that checks the number of characters in cell “A1” that contain say for example the text string “One Thousand Five Hundred Twenty Five”. When the number of characters exceeds the maximum of 20, it will trim the result to 20 characters or LESS but will still preserve the whole text prior to the maximum character limit. In this case, 20 characters will result to “One Thousand Five Hu”. With the given condition, the formula in cell “B10” must result to “One Thousand Five” thereby still preserving the complete words prior to the maximum limit.

    In cell “B11”, another formula must also result in “Hundred Twenty Five” completing the whole text string in cell “A1”. I just can’t figure out what the formulas must be to have the desired results.

    Any help is very much appreciated. Thank you.
    Last edited by cedric_dranreb; 11-18-2013 at 11:27 PM.

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Please help. Excel formula to split cell value to 2 cells

    Would love to help, but pretty sure your going to get a thread title change request

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Registered User
    Join Date
    11-11-2013
    Location
    Davao, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Excel formula to split cell value to 2 cells

    sorry about that. thanks for reminding.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Excel formula to split cell value to 2 cells

    say the string is in A1 then in Cell B1

    =iferror(TRIM(LEFT(A1,FIND("@@",SUBSTITUTE(A1," ","@@",20-LEN(SUBSTITUTE(LEFT(A1,20)," ","")))))),"")

    then in C1
    =iferror(TRIM(SUBSTITUTE(A1,B1,"")),"")

    Edit: Hope your all fine in Davao. Will be there in Jan. 11 for a tour.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Split string based on character count

    at B1

    =SUBSTITUTE(LEFT(A1,20),TRIM(RIGHT(SUBSTITUTE(LEFT(A1,20)," ",REPT(" ",100)),100)),)

    at C1

    =TRIM(SUBSTITUTE(A1,B1,))

+ 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. Split an Address in one cell into multiple cells using a formula
    By excelnovice2007 in forum Excel General
    Replies: 8
    Last Post: 01-22-2015, 10:49 AM
  2. Excel Split Single Cell Array into Multiple Cells
    By devinpitcher in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 12-07-2012, 07:13 AM
  3. A Formula to split a cell into 2 cells
    By NewGuy OnBlock in forum Excel General
    Replies: 2
    Last Post: 01-27-2011, 10:59 PM
  4. [SOLVED] How do I split a cell into 3 different cells in excel?
    By K8 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 06-16-2009, 05:11 AM
  5. [SOLVED] Can I split 1 cell into 2 cells in Excel?
    By Chalky in forum Excel General
    Replies: 5
    Last Post: 09-28-2005, 08:05 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