Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default MAX/MIN with SUMPRODUCT

Hi folks

I am using the following:
=IF($F$8="",0,SUMPRODUCT(MAX(($D$8:$D$73="H")*($F$ 8:$F$73))))
to show the highest attendance in a seasons fixture list.
Thus this changes as each game is completed and I fill the attendance.
The IF part is just to put in a 0 if the season hasn't started.
However, if I use that same formula with MIN,
=IF($F$8="",0,SUMPRODUCT(MIN(($D$8:$D$73="H")*($F$ 8:$F$73))))
I just get a 0
Is this because it's reading blank cells as zero's?
If so, how do i overcome this to just find the lowest value among
values entered (ignore blank cells)

Many thanks
Neil

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Is this because it's reading blank cells as zero's?


Yes

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=MIN(IF(D8:D73="H",IF(ISNUMBER(F8:F73),F8:F73)))

Biff

wrote in message
oups.com...
Hi folks

I am using the following:
=IF($F$8="",0,SUMPRODUCT(MAX(($D$8:$D$73="H")*($F$ 8:$F$73))))
to show the highest attendance in a seasons fixture list.
Thus this changes as each game is completed and I fill the attendance.
The IF part is just to put in a 0 if the season hasn't started.
However, if I use that same formula with MIN,
=IF($F$8="",0,SUMPRODUCT(MIN(($D$8:$D$73="H")*($F$ 8:$F$73))))
I just get a 0
Is this because it's reading blank cells as zero's?
If so, how do i overcome this to just find the lowest value among
values entered (ignore blank cells)

Many thanks
Neil



  #3   Report Post  
Max
 
Posts: n/a
Default

"Biff" wrote:
....
=MIN(IF(D8:D73="H",IF(ISNUMBER(F8:F73),F8:F73)))


To align with what the OP posted, suggest just a slight tweak to the above
array formula <g:

=IF($F$8="",0,MIN(IF($D$8:$D$73="H",IF(ISNUMBER($F $8:$F$73),$F$8:$F$73))))
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #4   Report Post  
Biff
 
Posts: n/a
Default

Max, you have to let them do "some" of the work!

Biff

"Max" wrote in message
...
"Biff" wrote:
...
=MIN(IF(D8:D73="H",IF(ISNUMBER(F8:F73),F8:F73)))


To align with what the OP posted, suggest just a slight tweak to the above
array formula <g:

=IF($F$8="",0,MIN(IF($D$8:$D$73="H",IF(ISNUMBER($F $8:$F$73),$F$8:$F$73))))
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #5   Report Post  
Max
 
Posts: n/a
Default

"Biff" wrote:
Max, you have to let them do "some" of the work!


Ah, but usually the child in me wins through the adult ! <g
Cheers.
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #6   Report Post  
 
Posts: n/a
Default

Thanks folks.

I went away and took another look in the interim, and concluded I'd
missed the array bit (even though I didn't use CTRL SHIFT ENTER on the
MAX calc!!) and ended up with:
{=IF($F$8="",0,SUMPRODUCT(MIN(IF(($D$8:$D$73="H")* ($F$8:$F$73<""),$F$8:$F$73))))}

Works a treat.
Thanks
Neil

  #7   Report Post  
Max
 
Posts: n/a
Default

Good to hear that you managed to work it out, Neil ..
but I'm not sure if the SUMPRODUCT(..) bit was required in this instance
(might be superfluous here, could be dispensed with ..)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
Thanks folks.

I went away and took another look in the interim, and concluded I'd
missed the array bit (even though I didn't use CTRL SHIFT ENTER on the
MAX calc!!) and ended up with:

{=IF($F$8="",0,SUMPRODUCT(MIN(IF(($D$8:$D$73="H")* ($F$8:$F$73<""),$F$8:$F$7
3))))}

Works a treat.
Thanks
Neil



  #8   Report Post  
Max
 
Posts: n/a
Default

Perhaps an alternative to try, array-entered
(i.e. press CTRL+SHIFT+ENTER):

=IF($F$8="",0,MIN(IF(($D$8:$D$73="H")*($F$8:$F$73< ""),$F$8:$F$73)))
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
Hi folks

I am using the following:
=IF($F$8="",0,SUMPRODUCT(MAX(($D$8:$D$73="H")*($F$ 8:$F$73))))
to show the highest attendance in a seasons fixture list.
Thus this changes as each game is completed and I fill the attendance.
The IF part is just to put in a 0 if the season hasn't started.
However, if I use that same formula with MIN,
=IF($F$8="",0,SUMPRODUCT(MIN(($D$8:$D$73="H")*($F$ 8:$F$73))))
I just get a 0
Is this because it's reading blank cells as zero's?
If so, how do i overcome this to just find the lowest value among
values entered (ignore blank cells)

Many thanks
Neil



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
Sumproduct Peter B Excel Worksheet Functions 1 March 7th 05 01:59 PM
sumproduct causing memory errors? dave Excel Worksheet Functions 1 March 3rd 05 09:31 AM
Can I reference =, <, or > sign in SUMPRODUCT BobT Excel Discussion (Misc queries) 7 February 16th 05 01:58 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


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