Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I wish to calculate the number of weekdays a project is recorded against. In my list I can have multiple of the same weekday for a specific project and task but I wish excel to only calculate it as 1 day for example: Mon 1-Dec-08 Artwork Draw Mon 1-Dec-08 Artwork Paint Tue 2-Dec-08 Wed 3-Dec-08 Artwork Paint Artwork was actually completed over 2 days not 3 how do I get excel to calculate 2 days and not 3? Thanks soo much! |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Sat, 20 Dec 2008 21:03:09 -0500, smartin wrote:
wrote: Hi, I wish to calculate the number of weekdays a project is recorded against. In my list I can have multiple of the same weekday for a specific project and task but I wish excel to only calculate it as 1 day for example: Mon 1-Dec-08 Artwork Draw Mon 1-Dec-08 Artwork Paint Tue 2-Dec-08 Wed 3-Dec-08 Artwork Paint Artwork was actually completed over 2 days not 3 how do I get excel to calculate 2 days and not 3? Thanks soo much! This array-entered* formula will do it: =SUM(IF(C1:C4="Artwork",1/COUNTIF(B1:B4,B1:B4))) *commit array formulae with Ctrl+Shift+Enter, not just Enter. Much more on counting distinct/unique values can be found he http://www.mrexcel.com/forum/showthread.php?t=70835 With a slight change in the data, your formula returns what I think is an incorrect result: Monday, December 01, 2008 Artwork Draw Monday, December 01, 2008 Construction Paint Tuesday, December 02, 2008 Wednesday, December 03, 2008 Artwork Paint Your formula, with this data, should still return 2, if I understand the question. However, it returns 1.5 --ron |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Ron Rosenfeld wrote:
On Sat, 20 Dec 2008 21:03:09 -0500, smartin wrote: wrote: Hi, I wish to calculate the number of weekdays a project is recorded against. In my list I can have multiple of the same weekday for a specific project and task but I wish excel to only calculate it as 1 day for example: Mon 1-Dec-08 Artwork Draw Mon 1-Dec-08 Artwork Paint Tue 2-Dec-08 Wed 3-Dec-08 Artwork Paint Artwork was actually completed over 2 days not 3 how do I get excel to calculate 2 days and not 3? Thanks soo much! This array-entered* formula will do it: =SUM(IF(C1:C4="Artwork",1/COUNTIF(B1:B4,B1:B4))) *commit array formulae with Ctrl+Shift+Enter, not just Enter. Much more on counting distinct/unique values can be found he http://www.mrexcel.com/forum/showthread.php?t=70835 With a slight change in the data, your formula returns what I think is an incorrect result: Monday, December 01, 2008 Artwork Draw Monday, December 01, 2008 Construction Paint Tuesday, December 02, 2008 Wednesday, December 03, 2008 Artwork Paint Your formula, with this data, should still return 2, if I understand the question. However, it returns 1.5 --ron Ah, right you are. Here's a work-around, though I was hoping to avoid a helper formula. Maybe there's a better way? With a helper formula in column E where E1=B1&C1 this seems to sort it out: =SUM(IF($C1:$C4="Artwork",1/COUNTIF(E1:E4,E1:E4))) Thanks for pointing that out. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
To count the unique dates (or numbers) that meet a condition (correspond to
artwork): Array entered** : =COUNT(1/FREQUENCY(IF(C1:C4="artwork",B1:B4),B1:B4)) =SUM(--(FREQUENCY(IF(C1:C4="artwork",B1:B4),B1:B4)0)) =SUM(IF(FREQUENCY(IF(C1:C4="artwork",B1:B4),B1:B4) ,1)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER) -- Biff Microsoft Excel MVP "smartin" wrote in message ... Ron Rosenfeld wrote: On Sat, 20 Dec 2008 21:03:09 -0500, smartin wrote: wrote: Hi, I wish to calculate the number of weekdays a project is recorded against. In my list I can have multiple of the same weekday for a specific project and task but I wish excel to only calculate it as 1 day for example: Mon 1-Dec-08 Artwork Draw Mon 1-Dec-08 Artwork Paint Tue 2-Dec-08 Wed 3-Dec-08 Artwork Paint Artwork was actually completed over 2 days not 3 how do I get excel to calculate 2 days and not 3? Thanks soo much! This array-entered* formula will do it: =SUM(IF(C1:C4="Artwork",1/COUNTIF(B1:B4,B1:B4))) *commit array formulae with Ctrl+Shift+Enter, not just Enter. Much more on counting distinct/unique values can be found he http://www.mrexcel.com/forum/showthread.php?t=70835 With a slight change in the data, your formula returns what I think is an incorrect result: Monday, December 01, 2008 Artwork Draw Monday, December 01, 2008 Construction Paint Tuesday, December 02, 2008 Wednesday, December 03, 2008 Artwork Paint Your formula, with this data, should still return 2, if I understand the question. However, it returns 1.5 --ron Ah, right you are. Here's a work-around, though I was hoping to avoid a helper formula. Maybe there's a better way? With a helper formula in column E where E1=B1&C1 this seems to sort it out: =SUM(IF($C1:$C4="Artwork",1/COUNTIF(E1:E4,E1:E4))) Thanks for pointing that out. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Dec 21, 2:04*pm, "T. Valko" wrote:
To count the unique dates (or numbers) that meet a condition (correspond to artwork): Array entered** : =COUNT(1/FREQUENCY(IF(C1:C4="artwork",B1:B4),B1:B4)) =SUM(--(FREQUENCY(IF(C1:C4="artwork",B1:B4),B1:B4)0)) =SUM(IF(FREQUENCY(IF(C1:C4="artwork",B1:B4),B1:B4) ,1)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER) -- Biff Microsoft Excel MVP "smartin" wrote in message ... Ron Rosenfeld wrote: On Sat, 20 Dec 2008 21:03:09 -0500, smartin wrote: wrote: Hi, I wish to calculate the number of weekdays a project is recorded against. In my list I can have multiple of the same weekday for a specific project and task but I wish excel to only calculate it as 1 day for example: Mon * *1-Dec-08 * * Artwork * * Draw Mon * *1-Dec-08 * * Artwork * * Paint Tue * * 2-Dec-08 Wed * 3-Dec-08 * * Artwork * * *Paint Artwork was actually completed over 2 days not 3 how do I get excel to calculate 2 days and not 3? Thanks soo much! This array-entered* formula will do it: =SUM(IF(C1:C4="Artwork",1/COUNTIF(B1:B4,B1:B4))) *commit array formulae with Ctrl+Shift+Enter, not just Enter. Much more on counting distinct/unique values can be found he http://www.mrexcel.com/forum/showthread.php?t=70835 With a slight change in the data, your formula returns what I think is an incorrect result: Monday, December 01, 2008 Artwork Draw Monday, December 01, 2008 Construction Paint Tuesday, December 02, 2008 Wednesday, December 03, 2008 Artwork Paint Your formula, with this data, should still return 2, if I understand the question. *However, it returns 1.5 --ron Ah, right you are. Here's a work-around, though I was hoping to avoid a helper formula. Maybe there's a better way? With a helper formula in column E where E1=B1&C1 this seems to sort it out: =SUM(IF($C1:$C4="Artwork",1/COUNTIF(E1:E4,E1:E4))) Thanks for pointing that out. Thanks everyone for giving me solutions! I used Biff's COUNT formula and it worked! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate Percentage Based On Number | Excel Discussion (Misc queries) | |||
IF statement to calculate based on cell values | Excel Worksheet Functions | |||
Function to calculate based on a portions of a number | Excel Worksheet Functions | |||
Calculate a 30-day moving average based on the last x number of entries and date | Excel Worksheet Functions | |||
Calculate number based on percentage | Excel Worksheet Functions |