View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default compare text in cells

Hi,

Am Sun, 1 Mar 2015 04:31:51 -0800 (PST) schrieb :

XY A B C A B B A C 3

XX B C A B C A C B 2

I need to count "A" and sumarize it at end of row i.e. 3


if your string is in B1 then:
=LEN(B1)-LEN(SUBSTITUTE(B1,"A",))

If "A" can occur in more columns, e.g . A1:C1 then:
SUM(LEN(A1:C1))-SUM(LEN(SUBSTITUTE(A1:C1,"A",)))
and insert this formula with CTRL+Shift+Enter


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2