View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jovan Timotijevic[_2_] Jovan Timotijevic[_2_] is offline
external usenet poster
 
Posts: 12
Default Functions/Formulas to count multiple variables



Lets say that you have a column A with the Location names, and next columns
are filled with the codes. Some locations have more codes than the other ones
and you want to count the codes. Is that right?

If you enter the name of the location to search for in B13 to count the
codes for this location, and location names are at A1:A10 try this:

=COUNTA(INDIRECT(ADDRESS(MATCH(B13,A1:A10,0),2,4)) :INDIRECT(ADDRESS(MATCH(B13,A1:A10,0),10,4)))

Last number 10 means that you should enter no more than 10 codes for any
location