简体   繁体   中英

Macro to copy data from one sheet to another based on the current date

Does anyone have a macro that copy data from one sheet to another based on the current date?

I am working with a single workbook of three sheets. Sheet one will hold the manual input of daily production figures for multiple plants, sheet two is to hold ongoing daily data, keyed on sheet one. The macro will be associated with a button, so that once clicked it would search for every row that has a date of today, and copy that row to the next available blank row on sheet two.

Sample Data...

Plant 1 Input
Date - $ Produced - Labor Hour
3-29-10 - 4538 - 8
3-30-10 - 7862 - 12
3-31-10
4-1-10
4-2-10

Plant 2 Input
Date - $ Produced - Labor Hour
3-29-10 - 4545 - 9
3-30-10 - 7645 - 12
3-31-10
4-1-10
4-2-10

the simplest way to do this would be to use the advanced filter, with the copy to another location checked. You will need a criteria range to act as the filter - you could use =now() to get today

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM