#1   Report Post  
Pete
 
Posts: n/a
Default Counting Occurences

I was given the array formula below to count the occurences of "12" &
"11.5" in a column of numbers.

=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),{12;11.5 }))

The number of teams competing can vary, the above example assumes 12
teams. If there is a dead heat, the points are shared so they get 11.5
each.

I have a cell AN1 that now holds the number of teams competing, so I
would like to change the {12;11.5} above to {$AN$1;$AN$1-0.5}, but keep
getting an error. If I can do this, then instead of changing all my
formulas, all I need to do is change the value in AN1.

Hope that makes sense

Pete

  #2   Report Post  
Max
 
Posts: n/a
Default

Try using 2 cells?

Put in AN1: 12, in AN2: =AN1-0.5

Then use, array-entered (press CTRL+SHIFT+ENTER):
=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),AN1:AN2) )

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Pete" wrote in message
oups.com...
I was given the array formula below to count the occurences of "12" &
"11.5" in a column of numbers.

=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),{12;11.5 }))

The number of teams competing can vary, the above example assumes 12
teams. If there is a dead heat, the points are shared so they get 11.5
each.

I have a cell AN1 that now holds the number of teams competing, so I
would like to change the {12;11.5} above to {$AN$1;$AN$1-0.5}, but keep
getting an error. If I can do this, then instead of changing all my
formulas, all I need to do is change the value in AN1.

Hope that makes sense

Pete



  #3   Report Post  
Leo Heuser
 
Posts: n/a
Default

Hi Pete

One way:

=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),$AN$1-{0,0.5}))

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Pete" skrev i en meddelelse
oups.com...
I was given the array formula below to count the occurences of "12" &
"11.5" in a column of numbers.

=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),{12;11.5 }))

The number of teams competing can vary, the above example assumes 12
teams. If there is a dead heat, the points are shared so they get 11.5
each.

I have a cell AN1 that now holds the number of teams competing, so I
would like to change the {12;11.5} above to {$AN$1;$AN$1-0.5}, but keep
getting an error. If I can do this, then instead of changing all my
formulas, all I need to do is change the value in AN1.

Hope that makes sense

Pete




  #4   Report Post  
Max
 
Posts: n/a
Default

Hi Leo,

Nice to see you around. It's much neater,
but perhaps there was a typo? Should it be:
=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),$AN$1-{0;0.5}))
(with the semicolon instead of the comma in " {0;0.5} ")
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Leo Heuser" wrote in message
...
Hi Pete

One way:

=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),$AN$1-{0,0.5}))

--
Best Regards
Leo Heuser

Followup to newsgroup only please.



  #5   Report Post  
Leo Heuser
 
Posts: n/a
Default

Hi Max

You are very kind :-)

Yes, you are right. It should have been a semicolon.

Thanks!

Regards
LeoH


"Max" skrev i en meddelelse
...
Hi Leo,

Nice to see you around. It's much neater,
but perhaps there was a typo? Should it be:
=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),$AN$1-{0;0.5}))
(with the semicolon instead of the comma in " {0;0.5} ")
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Leo Heuser" wrote in message
...
Hi Pete

One way:

=SUM(COUNTIF(OFFSET(G$1,{0,13,25,37},,12),$AN$1-{0,0.5}))

--
Best Regards
Leo Heuser

Followup to newsgroup only please.







  #6   Report Post  
Max
 
Posts: n/a
Default

It's good to see you around, Leo !
Cheers
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #7   Report Post  
Pete
 
Posts: n/a
Default

Thanks Leo works fine.

  #8   Report Post  
Leo Heuser
 
Posts: n/a
Default

You're welcome, Pete, and thanks for the feedback :-)

LeoH


"Pete" skrev i en meddelelse
ups.com...
Thanks Leo works fine.



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
Counting occurences of a specific day between two dates coal_miner Excel Worksheet Functions 1 April 20th 05 03:37 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM
Counting Number of Occurences Darren Excel Discussion (Misc queries) 1 February 23rd 05 03:26 PM
Back Dating (Counting Backwards) Aviator Excel Discussion (Misc queries) 5 February 9th 05 06:55 PM
Counting Rainfall Data TightIsobars Excel Discussion (Misc queries) 2 January 17th 05 11:45 PM


All times are GMT +1. The time now is 05:39 AM.

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"