1. The first worksheet contains a database.

2. The column headers can be seen in attached file.

3. Budget-Spent-Forecast attribute can be
1. Committed
2. Forecast

4.CW attribute is year followed by week number
example:
2014-35
2015-06
2015-08

5. Year attribute lists the year


6.Here is my problem. I want to figure out a way (function or a macro), that will run through the database and find the latest entry for the attribute ' committed'
ie.
committed - latest year

Then it proceeds to extract the week number. Then it exports the week number as 'CWweeknumber' to a cell in a different worksheet in the same file.

Any help would be grateful! Thank you!CWexcelmacro.xlsx