View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron@Buy Ron@Buy is offline
external usenet poster
 
Posts: 345
Default Count in a variable range

I am trying to count the number of "W"s entered into a row (e.g. row 8).
Row 7 has the days of each month (i.e. 1 thro' 28, 30, 31 as appropriate)
each number is entered in two merged cells (identifies a.m & p.m. in the rows
below)
Cell E2 contains a date
Using a formula, I need to count the "W"s in a range between a (first cell)
variable column row 8 and GW8 (formula will be copied down)
The variable first cell is dependent upon the date (E2) thus using
=ADDRESS(8,MATCH(DAY(E2),A7:AP7,0),4) will result in the correct cell for
the beginning of the range.
=COUNTIF(AM8:GW8,"W") works perfectly, however when the two are incorporated
thus
=COUNTIF(ADDRESS(8,MATCH(DAY(E2),A7:AP7,0),4):GW8, "W") I am told "The
formula I typed contains an error".
Any ideas what am I doing wrong?