Results 1 to 4 of 4

Count characters in each word of a cell

Threaded View

  1. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Count characters in each word of a cell

    Try this (see attachment)

    for B2: =IF(LEN(TRIM(B1))=0,0,LEN(TRIM(B1))-LEN(SUBSTITUTE(B1," ",""))+1)

    Used a vba to gather each word length
    Function FindWord(Source As String, Position As Integer)
    'Update 20131202
    Dim arr() As String
    arr = VBA.Split(Source, " ")
    xCount = UBound(arr)
    If xCount < 1 Or (Position - 1) > xCount Or Position < 0 Then
        FindWord = ""
    Else
        FindWord = arr(Position - 1)
    End If
    End Function
    For B3: =LEN(findword(B1,1))&","&LEN(findword(B1,2))&","&LEN(findword(B1,3))&","&LEN(findword(B1,4))&","&LEN(findword(B1,5))
    Attached Files Attached Files
    Last edited by Syrkrasi; 08-14-2017 at 04:30 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Count words and characters of hyperlinked word documents?
    By asterixo500 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-19-2015, 12:39 PM
  2. Macro that removes word based on characters in cell
    By wonderd in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-19-2015, 10:07 PM
  3. [SOLVED] Can I count characters in a cell
    By tuph in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2014, 10:09 PM
  4. [SOLVED] find word in string, count how many special characters are to its left
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2013, 06:46 PM
  5. [SOLVED] Formula needed for Removing Certain word + characters up to next Comma in a Cell
    By alw99 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-03-2012, 11:07 AM
  6. Add the word ERROR in the 133rd position after a string of characters in a cell
    By viantahu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2012, 04:32 PM
  7. Count Characters in a Cell
    By TOTO_POP in forum Excel General
    Replies: 2
    Last Post: 08-06-2010, 06:03 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