Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cobra
 
Posts: n/a
Default calculate percent met (comparing 2 date columns)


tia for helping me with this.

I have 2 columns of dates "duedate" and "compdate"

I want to calculate the percentage of rows that met the due date based
on the last 4 weeks.

if n2:n20 < (today-28) and if n2:n20 < d2:d20 = met

(something that takes all the dates within the last 4 weeks and counts
how many are on or before the due date)

divided by

n2:n20 < (today-28) = total (the total number of compdates)

hope that was clear. In my efforts to try and solve this I'm thinking
something like

=sum (countif n2:n20, <today(-28), <d2:20) / (count n2:n20 <
today(-28))

again thanks


--
Cobra
------------------------------------------------------------------------
Cobra's Profile: http://www.excelforum.com/member.php...o&userid=31065
View this thread: http://www.excelforum.com/showthread...hreadid=507405

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default calculate percent met (comparing 2 date columns)


You could use this formula

=AVERAGE(IF(N2:N20TODAY()-28,IF(N2:N20<=D2:D20,1,0)))

which needs to be confirmed with CTRL+SHIFT+ENTER

or this one which just needs enter

=SUMPRODUCT(--(N2:N20TODAY()-28),--(N2:N20<=D2:D20))/MAX(1,COUNTIF(N2:N20,""&TODAY()-28))

format as percentage

Note second formula also has the advantage that it won't return a
#DIV/0! error


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=507405

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cobra
 
Posts: n/a
Default calculate percent met (comparing 2 date columns)


Excellent, thank you daddylonglegs and I now understand where I was
missing the formating


--
Cobra
------------------------------------------------------------------------
Cobra's Profile: http://www.excelforum.com/member.php...o&userid=31065
View this thread: http://www.excelforum.com/showthread...hreadid=507405

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
auto date script for 2 columns? have 1.. nastech Excel Discussion (Misc queries) 2 November 22nd 05 03:10 PM
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
calculate future date kevrgallagher Excel Worksheet Functions 3 July 9th 05 02:26 AM
calculate anniversary of date after specified date slymeat Excel Worksheet Functions 3 July 5th 05 01:53 AM
Comparing Data in two columns Marianne Excel Worksheet Functions 3 November 5th 04 10:26 PM


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