Adding the total # of characters in multiple cells

S

SAMCAT

Two things I would like to automate:

I need to add the total number of characters in up to 5 cells to know that
they do not exceed 75 characters total. Anyone know how I can do this?

Example: character count in cells B, D, F, H, J = total # of characters used

Also, I would like to just be able to click on a cell and see how many
characters are in that cell, or at least know that it is less than 285
characters.

These are easy to do in Word with the tool word count, is there anything
like it in Excel?
 
R

Rajesh Mehmi

Hi
This shouls work for the first part, you could try using conditional
formatting for the >285

=LEN(B19)+LEN(D19)+LEN(F19)+LEN(H19)+LEN(J19)


Regards
Rajesh Mehmi
(e-mail address removed)
 
R

Roger Govier

Hi

Take a look at the LEN function

=LEN(A1) will return the number of characters in cell A1
 
S

Shane Devenshire

Hi,

because the cells are in every other column, and lets say on row 1 you can
use the following:

=SUMPRODUCT(LEN(B1:J1)*(MOD(COLUMN(B1:J1),2)=0))

As for a word count by clicking a cell - if you want that you will need
code. Suppose you want this for all sheets in the workbook:

Add this code to the thisWorkbook object in the VBE:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If ActiveCell <> "" Then
MsgBox Len(ActiveCell), vbDefaultButton1 + vbInformation, "Character
Count:"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top