Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Formula giving wrong result

Why does this:
=SUMPRODUCT(--(MONTH(B$7:B$998)=1))
return 992 when the entire column B is empty?
The other 11 permtations work as one would expect, but this particular one
counts 'blank' as January!
Any ideas?

tia
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Formula giving wrong result

Jock,

This is because Excel recognizes the fictitious date 0 Jan 1900 and is
the number 0. There exists adequate reasoning behind this design
choice. For the time being, you can count the Jan dates excluding
blank cells with:

=SUMPRODUCT((MONTH(B$7:B$998)=1)*(B$7:B$998<""))

HTH
Kostis Vezerides

On Oct 15, 4:48 pm, Jock wrote:
Why does this:
=SUMPRODUCT(--(MONTH(B$7:B$998)=1))
return 992 when the entire column B is empty?
The other 11 permtations work as one would expect, but this particular one
counts 'blank' as January!
Any ideas?

tia
--
Traa Dy Liooar

Jock



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Formula giving wrong result

Try =month(a1) when A1 is empty.

=SUMPRODUCT(--(isnumber(b$7:b$998)),--(MONTH(B$7:B$998)=1))



Jock wrote:

Why does this:
=SUMPRODUCT(--(MONTH(B$7:B$998)=1))
return 992 when the entire column B is empty?
The other 11 permtations work as one would expect, but this particular one
counts 'blank' as January!
Any ideas?

tia
--
Traa Dy Liooar

Jock


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Formula giving wrong result

Hi Jock

From a date viewpoint, Excel treats a blank cell as 00/01/1900 hence Month
1.

Try
=SUMPRODUCT(--(MONTH(B$7:B$998)=1),--(B$7:B$998<""))

--
Regards
Roger Govier



"Jock" wrote in message
...
Why does this:
=SUMPRODUCT(--(MONTH(B$7:B$998)=1))
return 992 when the entire column B is empty?
The other 11 permtations work as one would expect, but this particular one
counts 'blank' as January!
Any ideas?

tia
--
Traa Dy Liooar

Jock



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Formula giving wrong result

Thanks guys.

Next Q
How do I get this:
=COUNTIF($D5,(MIN($D$4:$D$15)))
to ignore zero's?
--
Traa Dy Liooar

Jock


"vezerid" wrote:

Jock,

This is because Excel recognizes the fictitious date 0 Jan 1900 and is
the number 0. There exists adequate reasoning behind this design
choice. For the time being, you can count the Jan dates excluding
blank cells with:

=SUMPRODUCT((MONTH(B$7:B$998)=1)*(B$7:B$998<""))

HTH
Kostis Vezerides

On Oct 15, 4:48 pm, Jock wrote:
Why does this:
=SUMPRODUCT(--(MONTH(B$7:B$998)=1))
return 992 when the entire column B is empty?
The other 11 permtations work as one would expect, but this particular one
counts 'blank' as January!
Any ideas?

tia
--
Traa Dy Liooar

Jock






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Formula giving wrong result

=($D5=MIN($D$4:$D$15))*($D5<"")

HTH
Kostis

On Oct 15, 5:29 pm, Jock wrote:
Thanks guys.

Next Q
How do I get this:
=COUNTIF($D5,(MIN($D$4:$D$15)))
to ignore zero's?
--
Traa Dy Liooar

Jock

"vezerid" wrote:
Jock,


This is because Excel recognizes the fictitious date 0 Jan 1900 and is
the number 0. There exists adequate reasoning behind this design
choice. For the time being, you can count the Jan dates excluding
blank cells with:


=SUMPRODUCT((MONTH(B$7:B$998)=1)*(B$7:B$998<""))


HTH
Kostis Vezerides


On Oct 15, 4:48 pm, Jock wrote:
Why does this:
=SUMPRODUCT(--(MONTH(B$7:B$998)=1))
return 992 when the entire column B is empty?
The other 11 permtations work as one would expect, but this particular one
counts 'blank' as January!
Any ideas?


tia
--
Traa Dy Liooar


Jock



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
Formula returning wrong result. Steve Hunt Excel Worksheet Functions 1 December 2nd 06 09:10 AM
Sumif formula not giving result abanerji Excel Discussion (Misc queries) 5 June 13th 06 07:20 PM
Formula not giving me the right result Steved Excel Worksheet Functions 6 May 10th 06 03:22 AM
FORMULA PRODUCES WRONG RESULT Wildebeest222 Excel Discussion (Misc queries) 2 October 11th 05 09:27 AM
Formula Result Correct but value in the cell is wrong jac Excel Worksheet Functions 2 December 17th 04 08:05 PM


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