Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2018, 09:55 AM
Awesomeg Awesomeg is offline How to count alphabets in a sentence? Windows 7 64bit How to count alphabets in a sentence? Office 2013
Novice
How to count alphabets in a sentence?
 
Join Date: Mar 2018
Posts: 1
Awesomeg is on a distinguished road
Default How to count alphabets in a sentence?


How do you count how many alphabets there are in a sentence? I did a search and found only "how to count how many characters in the whole script" but not how many alphabets/characters are there in a sentence.
Reply With Quote
  #2  
Old 03-09-2018, 02:21 PM
macropod's Avatar
macropod macropod is offline How to count alphabets in a sentence? Windows 7 64bit How to count alphabets in a sentence? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Simly select the range you want the stats for, then click on the 'Word Count' button on Word's status bar.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-09-2018, 09:37 PM
gmayor's Avatar
gmayor gmayor is offline How to count alphabets in a sentence? Windows 10 How to count alphabets in a sentence? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The following macro will count the unique occurrences of each character in a string thus
Lorem will have five unique characters and Lorem ipsum will have ten unique characters (including the space). mummy will have three unique characters.

Code:
Sub CountUniqueChars()
Dim Col As Collection
Dim oRng As Range
Dim i As Integer
    If Len(Selection.Range) > 0 Then
        Set oRng = Selection.Range
        Set Col = New Collection
        On Error Resume Next
        For i = 1 To Len(oRng)
            Col.Add Mid(oRng.Text, i, 1), Mid(oRng.Text, i, 1)
        Next i
        MsgBox Col.Count
    Else
        MsgBox "Nothing selected"
    End If
lbl_Exit:
    Set Col = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Tags
alphabets, characters

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to count alphabets in a sentence? Getting the Count formula to count all rows Jennifer Murphy Word Tables 11 08-23-2016 09:37 PM
Convert alphabets to numeric values kjxavier Word 3 07-06-2014 05:34 AM
Convert numeric values with decimals to alphabets kjxavier Word 1 07-06-2014 01:44 AM
How to count alphabets in a sentence? Delete does not bring second sentence closer to first sentence Andoheb Word 29 07-03-2014 01:48 PM
How to count alphabets in a sentence? Running alphabets at left margins and pinpoint cites at right margin ghumdinger Word 3 05-05-2011 02:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft