Copy data from one sheet to another sheets in the same excel based on date

shansakhi

Active Member
Joined
Apr 5, 2008
Messages
276
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Good Morning.

I require your assistance to build a macro to copy data from one sheet to another sheets in same excel file based on date criteria.


Below is the main file where we have three sets (may be more in actuals) data which we need to segregate to three different sheets based on date criteria.

Below Data is in one sheet. (Please note the column and rows may increase)
ABCD123
ORGDestCarPTFCAmountEff Date
A1B1ABHUBPS41223-Sep-14
A2B2ABHUBKS44224-Sep-14
A3B3ABHUBLS48225-Sep-14
ABCD456
ORGDestCarPTFCAmountEff Date
A4B4BBBUBPB40024-Sep-14
A5B5BBBUBKB52025-Sep-14
A6B6BBBUBLB30022-Sep-14
ABCD789
ORGDestCarPTFCAmountEff Date
A7B7CBCUBPC30221-Sep-14
A8B8CBCUBKC10222-Sep-14
A9B9CBCUBLC60020-Sep-14

<TBODY>
</TBODY>


We would like to have three dirfferent sheets ABCD123, ABCD456 and ABCD789 (the names may change).
Then based on Eff Date -- if data is availabe from same day onward then we need to copy the same and paste it to respecting sheets.

Considering 23 Sep 2014 is today ...

The data in output sheets would be as below ...

Sheet1 - ABCD123

ORGDestCarPTFCAmountEff Date
A1B1ABHUBPS41223-Sep-14
A2B2ABHUBKS44224-Sep-14
A3B3ABHUBLS48225-Sep-14

<TBODY>
</TBODY>


Sheet2-ABCD456

ORGDestCarPTFCAmountEff Date
A4B4BBBUBPB40024-Sep-14
A5B5BBBUBKB52025-Sep-14

<TBODY>
</TBODY>


Sheet3-ABCD789

"NO NEW DATA"
(As there is no data available from 23 Sep 14 onward)

Regards,
Shantanu
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,214,881
Messages
6,122,074
Members
449,064
Latest member
MattDRT

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