View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default COUNTIF(LEFT('SpreadSheet1!A1:A25, 1), "A")

I like COUNTIF but don't include the ' in front of the sheet name.

You can eliminate the sheet reference alltogether if you name the range, for
example suppose I name it D for data. Then here are some of your possible
formulas:

=COUNTIF(D,"a*")
=SUMPRODUCT(N(LEFT(D)="a"))
=SUM(N(LEFT(D)="a")) entered as an array

Note since you are looking for the first character you don't need to specify
the second argument of the LEFT function. Also, although it is in vogue to
use -- to convert TRUE,FALSE to 1,0 N is shorter in this case.

Note also that none of these formulas are case sensitive, but you can do a
case sensitive version.
--
Cheers,
Shane Devenshire


"KL" wrote:

COUNTIF('SpreadSheet1!A1:A25,"A*")

--
KL
[MVP - Microsoft Excel]
RU: http://www.mvps.ru/Program/Default.aspx
ES: http://mvp.support.microsoft.com/?LN=es-es
EN: http://mvp.support.microsoft.com/?LN=en-us
Profile: https://mvp.support.microsoft.com/pr...A-9E6C73C09A36


"Dorian C. Chalom" wrote in message ...
How would I create this function to do a Count If the left character in a
range of cells is an "A"?

COUNTIF(LEFT('SpreadSheet1!A1:A25, 1), "A")



Thank you.