View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson Greg Wilson is offline
external usenet poster
 
Posts: 747
Default Macros for calculating the range

Forget the macro. Enter the following formula in cell D1 and drag it down n
rows:

=COUNTIF(A1:C1, "yes")

Regards,
Greg

"raja" wrote:

hi all,

A B C D
Yes Yes Yes 3
No No No 0
Yes No NO 1

it should calculate individually for each row..

it should count number of yes from a1 to c1 and store it in d1
and it should count number of yes from a2 to c2 and store it in d2
and a3 to c3 in d3

likewise for n rows

Pls refer the above example

thank u

in macros pls