# Graph

#### Craig1

##### Active Member
Hi All,
I want to create a bar chart or graph based on how many times a colour appears in column B based on the start and end date of a month. This would be added to on a monthly basis.
Do I start from the 1st Jan to 31 Dec and have zero's for all the months to come.

Excel Workbook
AB
1DateDepartment
225/02/2011Blue
326/02/2011Blue
427/02/2011Blue
528/02/2011Blue
601/03/2011Blue
702/03/2011Blue
803/03/2011Blue
904/03/2011Blue
1005/03/2011Blue
1106/03/2011Blue
1207/03/2011Blue
1308/03/2011Blue
1409/03/2011Blue
1510/03/2011Blue
1611/03/2011Blue
1712/03/2011Blue
1813/03/2011Blue
1914/03/2011Pink
2015/03/2011Pink
2116/03/2011Pink
2217/03/2011Pink
2318/03/2011Pink
2419/03/2011Pink
2520/03/2011Pink
2621/03/2011Pink
2722/03/2011Yellow
2823/03/2011Yellow
2924/03/2011Yellow
3025/03/2011Yellow
3126/03/2011Yellow
3227/03/2011Yellow
3328/03/2011Yellow
3429/03/2011Pink
3530/03/2011Blue
3631/03/2011Blue
3701/04/2011Blue
3802/04/2011Blue
3903/04/2011Yellow
4004/04/2011Pink
4105/04/2011Pink
4206/04/2011Pink
4307/04/2011Pink
4408/04/2011Pink
4509/04/2011Pink
4610/04/2011Pink
4711/04/2011Pink
4812/04/2011Pink
4913/04/2011Pink
5014/04/2011Yellow
5115/04/2011Yellow
5216/04/2011Yellow
5317/04/2011Yellow
5418/04/2011Yellow
5519/04/2011Yellow
5620/04/2011Yellow
5721/04/2011Yellow
5822/04/2011Yellow
Sheet1

I want to count how many times the 3 colours in colomn B based on the 1st March to 31st March. But I will need this to be able to update as the year goes on as more date is added.

Any help would be appreciated.

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Create a pivot table and pivot chart from your data and Group the dates by Month and Year. Sample:

<TABLE style="WIDTH: 394pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=522 border=0 x:str><COLGROUP><COL style="WIDTH: 96pt; mso-width-source: userset; mso-width-alt: 4681" width=128><COL style="WIDTH: 38pt; mso-width-source: userset; mso-width-alt: 1828" width=50><COL style="WIDTH: 68pt; mso-width-source: userset; mso-width-alt: 3291" span=3 width=90><COL style="WIDTH: 56pt; mso-width-source: userset; mso-width-alt: 2706" width=74><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; WIDTH: 96pt; BORDER-BOTTOM: #f0f0f0; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=128 height=17>Count of Department</TD><TD class=xl23 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; WIDTH: 38pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" width=50> </TD><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; WIDTH: 68pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" width=90>Department</TD><TD class=xl23 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; WIDTH: 68pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" width=90> </TD><TD class=xl23 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; WIDTH: 68pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" width=90> </TD><TD class=xl24 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; WIDTH: 56pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" width=74> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Years</TD><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Date</TD><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Blue</TD><TD class=xl25 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Pink</TD><TD class=xl25 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Yellow</TD><TD class=xl26 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Grand Total</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>2011</TD><TD class=xl27 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Feb</TD><TD class=xl22 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>4</TD><TD class=xl25 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"> </TD><TD class=xl25 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"> </TD><TD class=xl26 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>4</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl34 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17> </TD><TD class=xl28 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Mar</TD><TD class=xl29 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>15</TD><TD style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>9</TD><TD style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>7</TD><TD class=xl30 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>31</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl34 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17> </TD><TD class=xl28 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent">Apr</TD><TD class=xl29 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>2</TD><TD style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>10</TD><TD style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>10</TD><TD class=xl30 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: #f0f0f0; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent" align=right x:num>22</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl31 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Grand Total</TD><TD class=xl35 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: transparent"> </TD><TD class=xl31 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: transparent" align=right x:num>21</TD><TD class=xl32 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: transparent" align=right x:num>19</TD><TD class=xl32 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: #f0f0f0; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: transparent" align=right x:num>17</TD><TD class=xl33 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: transparent" align=right x:num>57</TD></TR></TBODY></TABLE>

Thanks for that Andrew I will give it a try.

Craig

Replies
2
Views
214
Replies
1
Views
209
Replies
4
Views
307
Replies
4
Views
262
Replies
2
Views
623

1,218,576
Messages
6,143,314
Members
450,477
Latest member
teresab543

### 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.

### Which adblocker are you using?

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

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