Macro to produce report on closed items and new items

vib

New Member
Joined
Sep 12, 2011
Messages
2
Hi,

I am struggling to write a macro which will automatically filter out some specific data by comparing two tables. Here's the situation:

1. The raw data is imported from database with a list of items. Now, each month some items get closed down and some new items appear. The relevant columns in the raw data are:

Item No. - This is unique for each item
Status - Open/ Closed/ Pending etc.
Open from - The day since the item has been open
Closed on - The day the item has been closed

2. Also, I will need to find out the top 5 items opened for longest time.

I will need to produce these 3 lists - Items opened, Items closed and Top 5 items open for longest time and paste them into one sheet.

Now, the idea came up to my mind is to copy last months data into a new sheet and then compare them to find out the new items and closed items. But having no experience in using VB before I am struggling to write the macro. I have tried recording it but it's no good. Any suggestion?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Can anyone please let me know if there is a possible solution to this problem? And what would be the best way to go about it?
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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