Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to ignore blank date cells in sumproduct

I have a worksheet in which I am tring to sum the data based upon a code
range, a date range and cost range. However when I enter this formula it sums
the data from blank cells into the cell i wish to sum all the costs for
January.

=SUMPRODUCT(--($B$2:$B$268=$U277),--(MONTH($D$2:$D$268)=8),($K$2:$K$268))

Is there any way around this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How to ignore blank date cells in sumproduct

Hi,

I can't make that formula misbehave, it looks fine to me can you give the
precise circumstances under which you get an error.

Mike

"Phil_S" wrote:

I have a worksheet in which I am tring to sum the data based upon a code
range, a date range and cost range. However when I enter this formula it sums
the data from blank cells into the cell i wish to sum all the costs for
January.

=SUMPRODUCT(--($B$2:$B$268=$U277),--(MONTH($D$2:$D$268)=8),($K$2:$K$268))

Is there any way around this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to ignore blank date cells in sumproduct

Thanks for the reponse Mike.

I have...

CODE ORDER DATE COST
CS01 7-Jan-08 £200.00
MT03 14-Jan-08 £4000.00
MT03 (blank) £500.00

This is a shortened example

The formula is fine but my problem is when a cell in the date column is
blank it assumes that it is the 00-Jan-00 and totals up the data in my
January totals Table.

I would like it to ignore the blank cells. Is this Possible?

"Mike H" wrote:

Hi,

I can't make that formula misbehave, it looks fine to me can you give the
precise circumstances under which you get an error.

Mike

"Phil_S" wrote:

I have a worksheet in which I am tring to sum the data based upon a code
range, a date range and cost range. However when I enter this formula it sums
the data from blank cells into the cell i wish to sum all the costs for
January.

=SUMPRODUCT(--($B$2:$B$268=$U277),--(MONTH($D$2:$D$268)=8),($K$2:$K$268))

Is there any way around this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to ignore blank date cells in sumproduct

Check to see if there's something numeric in that D range:

=SUMPRODUCT(--($B$2:$B$268=$U277),
--(isnumber($d$2:$d$268),
--(MONTH($D$2:$D$268)=1),
($K$2:$K$268))

Phil_S wrote:

I have a worksheet in which I am tring to sum the data based upon a code
range, a date range and cost range. However when I enter this formula it sums
the data from blank cells into the cell i wish to sum all the costs for
January.

=SUMPRODUCT(--($B$2:$B$268=$U277),--(MONTH($D$2:$D$268)=8),($K$2:$K$268))

Is there any way around this?


--

Dave Peterson
  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default How to ignore blank date cells in sumproduct

You could just add one more part tp your formula:
=SUMPRODUCT(--($B$2:$B$268=$U277),--(MONTH($D$2:$D$268)=8),--($D$2:$d$268<""),($K$2:$K$268))

--
John C


"Phil_S" wrote:

Thanks for the reponse Mike.

I have...

CODE ORDER DATE COST
CS01 7-Jan-08 £200.00
MT03 14-Jan-08 £4000.00
MT03 (blank) £500.00

This is a shortened example

The formula is fine but my problem is when a cell in the date column is
blank it assumes that it is the 00-Jan-00 and totals up the data in my
January totals Table.

I would like it to ignore the blank cells. Is this Possible?

"Mike H" wrote:

Hi,

I can't make that formula misbehave, it looks fine to me can you give the
precise circumstances under which you get an error.

Mike

"Phil_S" wrote:

I have a worksheet in which I am tring to sum the data based upon a code
range, a date range and cost range. However when I enter this formula it sums
the data from blank cells into the cell i wish to sum all the costs for
January.

=SUMPRODUCT(--($B$2:$B$268=$U277),--(MONTH($D$2:$D$268)=8),($K$2:$K$268))

Is there any way around this?

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
Ignore Blank or 0 cells Dave Excel Worksheet Functions 4 August 20th 08 12:06 AM
Ignore blank cells when calculating date for If, Then function AndreaS13 Excel Worksheet Functions 3 July 29th 08 12:30 AM
SUMPRODUCT - Ignore blank rows sahafi Excel Worksheet Functions 8 June 13th 07 06:11 PM
ignore blank cells Leticia Excel Discussion (Misc queries) 3 February 27th 06 05:41 PM
How to ignore blank cells MattBeckwith Charts and Charting in Excel 10 February 19th 06 11:16 PM


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