Need help to write a macro

kramesh

New Member
Joined
Oct 11, 2006
Messages
3
Hi all,
I have the following data in sheet1.

id state date
123 A 11/2/05
234 B 11/2/05
123 B 11/4/05
234 C 11/4/05

I need to read the above data and count how many are in State-A , State-B, State-C for a particular date and write the following in sheet2.

Sate-A Sate-B State-C
------------------------------------------------------
11/2/05 <total count> <total-count>
--------------------------------------------------------
11/3/05
-------------------------------------------------------
11/4/05
-----------------------------------------------------
I am new to VB and don't know how to do this. Your help is appreciated.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Are you sure you need code for this?

It looks to me like something that could be done with either a pivot table or formulas.
 
Upvote 0
How can I do with the formula? The problem is once the state changes(e: from State-A to State-B on date 11/4/05), the count value for that date in column(State-B) will be incremenated by 1 and count value of Column(State-A) will be decremented by 1
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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