+ Reply to Thread
Results 1 to 2 of 2

Count no. of words in cell, put 0 for blanks

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    671

    Count no. of words in cell, put 0 for blanks

    Hi guys,

    Using this formula:

    =(LEN(TRIM(G2))-LEN(SUBSTITUTE(G2," ",""))+1)

    How do I change it to say if a cell is blank, return 0 instead of 1. It is counting blank cells as 1 suggesting it has a word but it doesn't1!

    thank you
    Thanks,

    R.



  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,065

    Re: Count no. of words in cell, put 0 for blanks

    Try this:

    =LEN(TRIM(G2))-LEN(SUBSTITUTE(G2," ",""))+(G2<>"")

+ 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. count non blanks and blanks frequency in chunks
    By egret in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2019, 08:13 AM
  2. [SOLVED] Formula to count blanks and non-blanks with a dynamic range
    By brittdyer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-12-2018, 07:45 AM
  3. Replies: 20
    Last Post: 05-02-2014, 06:42 AM
  4. Count words-I want a function that can count the words in a cell
    By wilhelm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-19-2009, 03:41 PM
  5. Need Macro To Add 2 Blanks Cells Below Cell with words.
    By donnydorko in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-29-2009, 05:39 PM
  6. count 2 or more words in a cell
    By Statsman in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-22-2008, 02:40 PM
  7. Count in a cell where there is several words...
    By koda86 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-27-2007, 05:26 PM

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