VBA Question-

ljg713

New Member
Joined
Oct 19, 2015
Messages
3
[TABLE="width: 500"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]2[/TD]
[TD]1-15-2000[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]3[/TD]
[TD]2-29-2011[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]6[/TD]
[TD]3-6-2007[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]5[/TD]
[TD]6-5-2010[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]2[/TD]
[TD]8-21-2015[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]1[/TD]
[TD]9-4-2014[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]3[/TD]
[TD]6-18-2015[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]5[/TD]
[TD]2-19-2002[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]4[/TD]
[TD]7-3-2009[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]6[/TD]
[TD]1-20-2005[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]7[/TD]
[TD]2-3-2010[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]6[/TD]
[TD]5-27-2006[/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD]2[/TD]
[TD]4-21-2009[/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD]8[/TD]
[TD]5-20-2004[/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD]2[/TD]
[TD]6-2-2009[/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD]9[/TD]
[TD]5-20-2001[/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD]3[/TD]
[TD]4-19-2000[/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD]7[/TD]
[TD]3-18-2013[/TD]
[/TR]
</tbody>[/TABLE]


Hello,

I am new to VBA and have been trying to find some code online similar to the problem I am trying to solve. The table above is similar to the data I am using. I am trying to find the number of items in the 'fruit' column by month and year. The second column of id's is irrelevant.

Basically, I would be trying to take the data from the table above to fill out the table below so that each fruit would be in one row counted and sorted by dates based off of month and year from January 2000 though December 2015. Any ideas/tips? Thanks :)

[TABLE="width: 500"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]Jan-2000[/TD]
[TD]Feb-2000[/TD]
[TD]...[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Nov-2015[/TD]
[TD]Dec-2015[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Coconut[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,226,739
Messages
6,192,740
Members
453,755
Latest member
IQBS

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