T
Tammy Robinson
I have a spreadsheet that includes the following: 2 columns (d and e)
with a beginning and end date, a column with a dollar amount (rent: g)
and. 24 columns across (Jan - Dec for two years:- n - ak). The 24
columns across contain the date ie. (01/01/2012, 02/01/2012, and so
on).
I am wanting to compare the range of D - E with each column across.
When it meets the criteria it will put the amount in G in each column
that is BETWEEN the date range. For example:
if the beginning date is 01/01/2012 (d), the ending date is 06/01/2013
(e), and rent is $3000 (g), I would like Jan - Dec 2012 and Jan - Jun
2013 to be populated with $3000. The remaining columns would be 0.
I have tried the following, but will only work for 2012.
=IF(AND(MONTH($D:$D)<=MONTH(T$9),YEAR($D:$D)<=YEAR(T$9),MONTH($E:
$E)>=MONTH(T$9),YEAR($E:$E)=YEAR(T$9)),$G:$G,0)
What am I doing wrong? Any help is much appreciated.
Thanks
with a beginning and end date, a column with a dollar amount (rent: g)
and. 24 columns across (Jan - Dec for two years:- n - ak). The 24
columns across contain the date ie. (01/01/2012, 02/01/2012, and so
on).
I am wanting to compare the range of D - E with each column across.
When it meets the criteria it will put the amount in G in each column
that is BETWEEN the date range. For example:
if the beginning date is 01/01/2012 (d), the ending date is 06/01/2013
(e), and rent is $3000 (g), I would like Jan - Dec 2012 and Jan - Jun
2013 to be populated with $3000. The remaining columns would be 0.
I have tried the following, but will only work for 2012.
=IF(AND(MONTH($D:$D)<=MONTH(T$9),YEAR($D:$D)<=YEAR(T$9),MONTH($E:
$E)>=MONTH(T$9),YEAR($E:$E)=YEAR(T$9)),$G:$G,0)
What am I doing wrong? Any help is much appreciated.
Thanks