+ Reply to Thread
Results 1 to 10 of 10

Assigning numerical value to text entries

  1. #1
    Registered User
    Join Date
    10-20-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Assigning numerical value to text entries

    If I have a row of text that looks like the row below and I only in this case want to add up the b's, there my be only 1 b in the cell or 3 b's but either way I only want to total up the b's, how do I do this? If I knew how to assign a value such as b=1, bb=2, bbb=3 and then only count the b text in the row that would also work.

    b
    bbb
    aa
    c
    bbb
    bb
    d
    Total b's =9

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Assigning numerical value to text entries

    Hi,

    =SUMPRODUCT(LEN(A1:A7)-LEN(SUBSTITUTE(A1:A7,"b","")))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    10-20-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assigning numerical value to text entries

    Thanks for the answer to my problem. This was the exact answer that I was looking for.

  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,939

    Re: Assigning numerical value to text entries

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    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
    10-20-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assigning numerical value to text entries

    One other question, what if there are breaks in my column that contain text and I don't want these cells to be included in the text count, how do I exclude them from being counted?

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Assigning numerical value to text entries

    What do you mean by 'breaks'? Can you give another example, again with your desired results?

    Regards

  7. #7
    Registered User
    Join Date
    10-20-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assigning numerical value to text entries

    My spreadsheet is a few pages and I've posted the column heading on each page and if there are any of the same letters appear in the column heading then they will also be counted in text total. This could be an issue with how I've set up my column headings on the individual pages.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Assigning numerical value to text entries

    Hmmm.

    You mean "a few pages" as in print pages? When you're in Page Break Preview?

    You know that if it's just for printing then you can tell Excel to repeat your header from the very first sheet when printing - without having to have it physically present in the sheet at the top of each page break?

    Regards

  9. #9
    Registered User
    Join Date
    10-20-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assigning numerical value to text entries

    No I didn't know that and yes the breaks were only for showing the heading again. I'll take them out and set up my printing to repeat the original header.

    Thanks again.

  10. #10
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Assigning numerical value to text entries

    You're welcome.

+ 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. Converting text strings into numerical values for multiple entries
    By exceln00bie113 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-13-2013, 10:55 AM
  2. Assigning numerical value to text in data validation list
    By Ryanuncsu in forum Excel General
    Replies: 2
    Last Post: 02-17-2013, 08:31 AM
  3. Assigning a Combo box selection to numerical value in text box
    By Westwisco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2011, 04:32 PM
  4. Replies: 2
    Last Post: 07-20-2008, 09:53 PM
  5. assigning numbers to text entries
    By biggybriggy in forum Excel General
    Replies: 1
    Last Post: 03-08-2006, 01:00 AM

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