View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default How do I ask a cell to look only at the first character in a c

Use a help column with a formula and extract the first character

=LEFT(C1)

copy down

assume you put that in D2:D50

then use

=SUM(COUNTIF(C2:C50,{"A","H","V"}))


otherwise try


=SUMPRODUCT(--(LEFT(C2:C50)={"A","H","V"}))


--
Regards,

Peo Sjoblom



"soconfused" wrote in message
...
I didn't pose the question right. I should have said I have a column with
these variables and at the bottom, I want to sum all the A's, H's and V's.
--
DMM


"Toppers" wrote:

in D1:

=if(OR(left(C1)="A",left(C1)="H"),1,"")

HTH

"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula
here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM