LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default COUNTIF on changing range

I have a spreadsheet that logs letters I send out to various agencies.
Each time I add a letter to the log, I use a macro which creates a new
line at the top of the log in row 3 so newest letters are at the top.
In column A is the index number of the letter which is simply 1 added
to the previous index no. In column G is a status indicator, either an
"F" or an "N".

I want to count the Fs in column G and divide by the total number of
letters. The total is there in A3. The following formula works fine,
until I add a new row:
=COUNTIF(INDIRECT("G3:G" & A3+2),"F")/A3

When I add a new row, the "G3", and both "A3"s increment to G4 and A4
respectively, and the formula omits row 3 from the count. As I add
more lines, the new lines are not included in the count. I'd like to
know how to get around this problem. I've tried several combinations
to make the 3 a constant, one of which is:
=COUNTIF(INDIRECT("G"&"3:G"&"3"+2),"f")/"a"&"3"
but it returns a #REF or sometimes a #VALUE error.
Does anyone know how to write this formula so it works?
Thanks for the help.

 
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
Changing the range for averages with out changing the formula. JessLRC Excel Worksheet Functions 0 April 20th 10 03:10 PM
Countif to changing range davegb[_2_] Excel Programming 2 September 27th 07 09:38 PM
Countif with a changing range Rayo K Excel Worksheet Functions 2 July 15th 06 02:29 PM
CountIF and changing ranges dark Excel Worksheet Functions 3 October 2nd 05 06:17 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM


All times are GMT +1. The time now is 05:47 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"