Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Counting letter ranges

Greetings,

I have a list of company names that I need to tally a number for based on
the first two letters of the name over a range. For instance how many
companies begin with the letters "HI-MF". I have used the formula
=COUNTIF(A:A,"HI*") to get the first part but I do not know how to expand
this formula over a range of letters.

Any assistance would be very much appreciated... Best Regards,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Counting letter ranges

Try this

=SUMPRODUCT(--(LEFT(A2:A20,2)="HI"),--(LEFT(A2:A20,2)<="MF"))

HTH

Bob

"Carter" wrote in message
...
Greetings,

I have a list of company names that I need to tally a number for based on
the first two letters of the name over a range. For instance how many
companies begin with the letters "HI-MF". I have used the formula
=COUNTIF(A:A,"HI*") to get the first part but I do not know how to expand
this formula over a range of letters.

Any assistance would be very much appreciated... Best Regards,



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Counting letter ranges

On Thu, 21 Jan 2010 12:22:15 -0000, "Bob Phillips"
wrote:

Try this

=SUMPRODUCT(--(LEFT(A2:A20,2)="HI"),--(LEFT(A2:A20,2)<="MF"))

HTH

Bob


Modification to eliminate counting entries like:

A2: M

=SUMPRODUCT(--(LEFT(rng,2)="HI"),--(LEFT(rng,2)<="MF"),--(LEN(rng)=2))

--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Counting letter ranges

Good point!

Bob

"Ron Rosenfeld" wrote in message
...
On Thu, 21 Jan 2010 12:22:15 -0000, "Bob Phillips"

wrote:

Try this

=SUMPRODUCT(--(LEFT(A2:A20,2)="HI"),--(LEFT(A2:A20,2)<="MF"))

HTH

Bob


Modification to eliminate counting entries like:

A2: M

=SUMPRODUCT(--(LEFT(rng,2)="HI"),--(LEFT(rng,2)<="MF"),--(LEN(rng)=2))

--ron



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Counting letter ranges


Both formulas work great! Many thanks!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting Ranges CGI Excel Discussion (Misc queries) 2 December 28th 09 05:16 PM
Automatic Letter Counting Kcope8302 Excel Discussion (Misc queries) 0 February 10th 09 08:03 PM
Counting numbers with a letter attached in excel pano Excel Worksheet Functions 13 January 14th 07 11:16 AM
Counting ranges, please help SMutchnick Excel Worksheet Functions 5 June 1st 06 07:55 PM
Letter Counting Function bctrophy Excel Worksheet Functions 2 December 21st 05 10:36 PM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"