Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 4
Default Excel 2000: Adding column D based on value in column A

Hi,

In a worksheet I have dates in column A (format
03/18/2008,/03/17/2008,03/17/2008) and in column D i have numbers (format
0.4,1.0.3).

I am looking for a formula to total all of the numbers where the date
happens to be a Monday - example:

Column A Column D
3/17/2008 0.5
3/17/2008 1
3/18/2008 2

I would like a formula that returns "1.5" because 3/17/2008 is a Monday.
Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel 2000: Adding column D based on value in column A

Try one of these:

=SUMPRODUCT(--(WEEKDAY(A2:A20)=2),D2:D20)

=SUMPRODUCT(--(TEXT(A2:A20,"ddd")="Mon"),D2:D20)


--
Biff
Microsoft Excel MVP


"al" wrote in message news:djSDj.2924$bN3.2476@trnddc03...
Hi,

In a worksheet I have dates in column A (format
03/18/2008,/03/17/2008,03/17/2008) and in column D i have numbers (format
0.4,1.0.3).

I am looking for a formula to total all of the numbers where the date
happens to be a Monday - example:

Column A Column D
3/17/2008 0.5
3/17/2008 1
3/18/2008 2

I would like a formula that returns "1.5" because 3/17/2008 is a Monday.
Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 4
Default Excel 2000: Adding column D based on value in column A

On Tue, 18 Mar 2008 13:30:09 -0400, T. Valko wrote:

Try one of these:

=SUMPRODUCT(--(WEEKDAY(A2:A20)=2),D2:D20)

=SUMPRODUCT(--(TEXT(A2:A20,"ddd")="Mon"),D2:D20)


Thanks a million, first one did the trick :)

-AL
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel 2000: Adding column D based on value in column A

"al" wrote in message news:cLTDj.2938$bN3.1504@trnddc03...
On Tue, 18 Mar 2008 13:30:09 -0400, T. Valko wrote:

Try one of these:

=SUMPRODUCT(--(WEEKDAY(A2:A20)=2),D2:D20)

=SUMPRODUCT(--(TEXT(A2:A20,"ddd")="Mon"),D2:D20)


Thanks a million, first one did the trick :)

-AL


You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 4
Default Excel 2000: Adding column D based on value in column A

I'm hoping for some help expanding on the formula:

{=SUM(--TEXT(A8:A153,"dddd")="Monday"))} This currently returns the count
of instances where a date falls on Monday - I am hoping to only count
them if G8:G153 is empty

and the same with:

{=SUMPRODUCT(--(WEEKDAY(A8:A153)=2),D8:D153)} This currently adds the
values in D8:D153 if the day happens to be a Monday in A8:A153, I would
ideally like it to only add the values in D8:D153 if G8:G153 are empty...

Any ideas?

Thanks again!

-AL


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Excel 2000: Adding column D based on value in column A

=SUMproduct(--(TEXT(A8:A153,"dddd")="Monday"),--(g8:g153=""))
and
=SUMPRODUCT(--(WEEKDAY(A8:A153)=2),--(g8:g153=""),D8:D153)

Using =sumproduct() means that you don't need to array enter the formula.



al wrote:

I'm hoping for some help expanding on the formula:

{=SUM(--TEXT(A8:A153,"dddd")="Monday"))} This currently returns the count
of instances where a date falls on Monday - I am hoping to only count
them if G8:G153 is empty

and the same with:

{=SUMPRODUCT(--(WEEKDAY(A8:A153)=2),D8:D153)} This currently adds the
values in D8:D153 if the day happens to be a Monday in A8:A153, I would
ideally like it to only add the values in D8:D153 if G8:G153 are empty...

Any ideas?

Thanks again!

-AL


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 4
Default Excel 2000: Adding column D based on value in column A

Perfect! Thanks Dave, that did the trick.
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
Adding a Custom Column based on an existing Column (EXPERT) Sean W. Excel Worksheet Functions 4 January 16th 08 04:24 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
Adding one column based on results from another column msbutton27 Excel Discussion (Misc queries) 1 October 17th 05 07:45 PM
Adding a column based on greater than a date Toni G. Excel Worksheet Functions 4 March 17th 05 08:06 PM
Adding Values Based on a Separate Column binder Excel Discussion (Misc queries) 2 February 14th 05 07:17 PM


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