Making a dynamic list that doesn't duplicate using VBA

GetHitFooL

New Member
Joined
May 19, 2015
Messages
13
Okay guys, so I need to go through all my rows of data anywhere from 800-2500 and look at the creation date. I have a function that finds how many rows so I just do a for loop to go through ever row. What I don't know how to do is select just the year from the creation date and add it to a t chart on another sheet named "Priority". If the year has already been listed I don't want it to be listed again.

For Example I could have the following example:


Creation Date
6/1/2015
4/5/2015
7/1/2012
8/2/2013


And would want the chart to list

2012
2013
2015


Then I want to go through and count how many of each of these occur in my data. The thing I don't get is how to count for just whats on the list since it could start at 2010 and go through 2015 or maybe another sheet just has 2014 and 25. So I don't know how many if statements to make and want this to be dynamic so it will work for years to come.




If we can solve this problem, how can I make a graph that uses just the data in the chart. I can't figure out how to take the t chart that we made above and make a graph with just that data. So sometimes it could have 5 years but some might have 2 and so on.
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Watch MrExcel Video

Forum statistics

Threads
1,122,560
Messages
5,596,842
Members
414,107
Latest member
Tigretto

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
Top