{"id":12122,"date":"2024-02-02T14:52:57","date_gmt":"2024-02-02T14:52:57","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=1284"},"modified":"2024-02-02T14:52:57","modified_gmt":"2024-02-02T14:52:57","slug":"get-word-count-letter-count-in-excel","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2024\/02\/get-word-count-letter-count-in-excel\/","title":{"rendered":"How to get Word Count and Letter Count in Excel Formula"},"content":{"rendered":"
Dear Readers,<\/p>\n
Getting a word Count of a String kept in a Cell, is not so difficult but sometimes you just don’t get it how to do it. So keeping that in mind, I wrote all possible ways to get Word Count of a String. You can get it by Excel Formula as well as UDF (User Defined Function).
\nWe will see both the methods one by one below:
\n<\/p>\n
Here in this Formula, the limitation is that if there are more than One spaces between two words then the Spaces will also be counted as a Word and the Count will not be proper. Put the below code in Regular Module of your Workbook.<\/p>\n <\/p>\n Now you can use the below Formula to get the Word Count =LEN(A1)<\/strong> This will return the total count of letters in that cell, including spaces as well.<\/p>\n<\/span>","protected":false},"excerpt":{"rendered":" Dear Readers, Getting a word Count of a String kept in a Cell, is not so difficult but sometimes you just don’t get it how to do it. So keeping that in mind, I wrote all possible ways to get Word Count of a String. You can get it by Excel Formula as well as […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1672,1673,2056],"tags":[],"class_list":["post-12122","post","type-post","status-publish","format-standard","hentry","category-excel-formula","category-excel-functions","category-udf"],"yoast_head":"\n
\n=LEN(A1)-LEN(SUBSTITUTE(A1,” “,””))+1
\n<\/strong>
\nWhere:<\/strong>
\nA1: <\/strong>Cell Address, Where your String is there.<\/p>\nNote:<\/h3>\n
\n<\/p>\n2. Get Word Count by User Defined Function (UDF) Macro<\/h3>\n
Function GetWordCount(Cell As Range)\n GetWordCount = UBound(Split(Cell.Value, \" \")) + 1\nEnd Function<\/code><\/pre>\n
\n=GetWordCount(Cell Address)<\/strong>
\n<\/p>\n3. Get Letter Count in Excel Formula<\/h3>\n
\nWhere:<\/strong>
\nA1: <\/strong>Cell Address, Where your String is there.
\n<\/p>\nNote:<\/h3>\n