Help! count table with dates

aodhan

New Member
Joined
Nov 12, 2009
Messages
7
Hi, I am trying to get a very large table to provide countable (0 or 1) or markable "X"
calendar year columns to get data for graphing #sites/calendar year. The table contains, for
example:

Location: start date exp date 2006 2007 2008 2009 2010 2011
alpha 2/2/06 2/2/09 x x x x
beta 10/11/09 10/11/11 x x x
etc; SUM=

I have tried using date <= or >= vlookup() and If() to utilize start/exp dates to count/mark
the calendar year with 1/1/'year' and 12/31/'year'. I can get the start year and expire year
to mark. But I am having tough time getting the intervening years to count/mark.
Thank you. :eeek:
 
Excel Workbook
ABCDEFGHI
1Location:start dateexp date200620072008200920102011
2alpha2/2/20062/2/2009111100
3beta10/11/200910/11/2011000111
Sheet1
Excel 2002
Cell Formulas
RangeFormula
D2=IF(AND(YEAR($B2)<=D$1,YEAR($C2)>=D$1),1,0)
D3=IF(AND(YEAR($B3)<=D$1,YEAR($C3)>=D$1),1,0)
E2=IF(AND(YEAR($B2)<=E$1,YEAR($C2)>=E$1),1,0)
E3=IF(AND(YEAR($B3)<=E$1,YEAR($C3)>=E$1),1,0)
F2=IF(AND(YEAR($B2)<=F$1,YEAR($C2)>=F$1),1,0)
F3=IF(AND(YEAR($B3)<=F$1,YEAR($C3)>=F$1),1,0)
G2=IF(AND(YEAR($B2)<=G$1,YEAR($C2)>=G$1),1,0)
G3=IF(AND(YEAR($B3)<=G$1,YEAR($C3)>=G$1),1,0)
H2=IF(AND(YEAR($B2)<=H$1,YEAR($C2)>=H$1),1,0)
H3=IF(AND(YEAR($B3)<=H$1,YEAR($C3)>=H$1),1,0)
I2=IF(AND(YEAR($B2)<=I$1,YEAR($C2)>=I$1),1,0)
I3=IF(AND(YEAR($B3)<=I$1,YEAR($C3)>=I$1),1,0)
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top