View Single Post
  #6   Report Post  
Barb Reinhardt
 
Posts: n/a
Default

If you choose=November (11), you get Nov and Dec.
If you choose <=March (3), you get Jan, Feb, March.

If you select AND, you'll get nothing because there is nothing that is both
=11 and <=3. That would work for dates between June and September,

however.

"John Cordes" wrote in message
news:dNoQd.47781$gA4.17299@edtnps89...
Tushar Mehta wrote:
Here's how I would do it. For one application see the 'Overview by
Day' page of the newsgroup stats (http://www.tushar-
mehta.com/excel/ngstats/overview-daily.html)

Suppose the months are in column A and the y-values in column B as in:
1-Jan 6
1-Feb 8
1-Mar 11
1-Apr 10
1-May 13
1-Jun 11
1-Jul 9
1-Aug 16
1-Sep 12
1-Oct 14
1-Nov 12
1-Dec 19
1-Jan 17
1-Feb 21
1-Mar 19
1-Apr 20
1-May 20
1-Jun 24
1-Jul 28
1-Aug 24
1-Sep 21
1-Oct 22
1-Nov 25
1-Dec 25

Then, in column C (C1 specifically) enter the formula
=IF(OR(MONTH(A1)<=3,MONTH(A1)=11),MAX($B$1:$B$24) ,NA())

Obviously, you would adjust the above formula for your specific needs.
This one 'shades' Nov.-Mar.
Copy C1 as far down col. C as there is data in column B.

Plot A:C as a column chart. Click the plotted series corresponding to
column B. Select Chart | Chart Type... and change it to a Line chart.

Double-click the plotted series corresponding to col. C. From the
Patterns tab, set the border to none and the area to some light color.
From the Options tab set the Gap Width to zero.


Just a quick question here. Why isn't the logical test required here
an AND rather than OR?

John