Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default COUNTIF with repeating pattern

I am attempting to do a COUNTIF on a long series of values. I need to count
among the first 100 values for all of the 1, 2, 3, 4. Then count among the
next 100 (101-200) for 1,2,3,4. (repeat 25 times) I am having to go into each
formula and type in the range of cells. Is there a faster way to do this
without naming each range before I create the formulas? Given that the
pattern repeats, it should be easy. . . I want to spend as little time as
possible scrolling up and down. Thank you!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default COUNTIF with repeating pattern

Try this

=COUNTIF(OFFSET($A$1,(INT((ROW()-1)/4)*100),0,100,1),MOD(ROW(),4)+(MOD(ROW()
,4)=0)*4)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"vandynd" wrote in message
...
I am attempting to do a COUNTIF on a long series of values. I need to

count
among the first 100 values for all of the 1, 2, 3, 4. Then count among the
next 100 (101-200) for 1,2,3,4. (repeat 25 times) I am having to go into

each
formula and type in the range of cells. Is there a faster way to do this
without naming each range before I create the formulas? Given that the
pattern repeats, it should be easy. . . I want to spend as little time as
possible scrolling up and down. Thank you!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,089
Default COUNTIF with repeating pattern

Assuming you want to count values in column A,

cell B1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),1)
cell C1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),2)
cell D1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),3)
cell E1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),4)

and drag down to row 25

Regards

Trevor


"vandynd" wrote in message
...
I am attempting to do a COUNTIF on a long series of values. I need to count
among the first 100 values for all of the 1, 2, 3, 4. Then count among the
next 100 (101-200) for 1,2,3,4. (repeat 25 times) I am having to go into
each
formula and type in the range of cells. Is there a faster way to do this
without naming each range before I create the formulas? Given that the
pattern repeats, it should be easy. . . I want to spend as little time as
possible scrolling up and down. Thank you!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default COUNTIF with repeating pattern

Thank you - I'll try both as I've never heard of OFFSET. Meanwhile, I
stumbled into PivotTables and my problem was immediately solved. Wish I'd
known that a few days ago!

Thanks again!

"Trevor Shuttleworth" wrote:

Assuming you want to count values in column A,

cell B1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),1)
cell C1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),2)
cell D1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),3)
cell E1: =COUNTIF(OFFSET($A$1,(ROW()-1)*100,,100),4)

and drag down to row 25

Regards

Trevor


"vandynd" wrote in message
...
I am attempting to do a COUNTIF on a long series of values. I need to count
among the first 100 values for all of the 1, 2, 3, 4. Then count among the
next 100 (101-200) for 1,2,3,4. (repeat 25 times) I am having to go into
each
formula and type in the range of cells. Is there a faster way to do this
without naming each range before I create the formulas? Given that the
pattern repeats, it should be easy. . . I want to spend as little time as
possible scrolling up and down. Thank you!




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
Search /Filter vertical Numeric pattern (down single column) Sam via OfficeKB.com Excel Worksheet Functions 0 July 7th 06 06:25 PM
countif cell pattern = Steve1154 Excel Worksheet Functions 2 February 15th 06 12:38 PM
repeating a data pattern in excel KelC Excel Discussion (Misc queries) 1 August 1st 05 08:38 PM
Linking a repeating pattern of non-adjacent cells wdg006 Excel Discussion (Misc queries) 2 December 14th 04 05:59 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


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

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

About Us

"It's about Microsoft Excel"