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.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,214,971
Messages
6,122,517
Members
449,088
Latest member
RandomExceller01

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