VBA to auto fill cells based on milestones and phases

Kevw1

New Member
Joined
Dec 6, 2017
Messages
36
Hi this is my first time posting and other then recording macros still very new to VBA but keen to learn, I have the following problem if anyone can help please? I have had a look in the forums and am struggling to utilise / find suitable code.

For summary only in table 1, this is my starting data, I have milestones that are against projects and months achieved for every milestone.

There are many more projects and months that span years in total, I need to convert the milestone to the Phase and populate the phase for the blank months until the next milestone is reached. In some cases milestones will be missing and may start half way through.

What I am trying to do is create a macro that:-
1. Check the value in the cell and matches to the milestone phase
2. If the cell is blank uses the previous milestone to calculate the phase
3. Repeat for every column against each project (many months over many years)
4. Repeat for each project
5. this can overwrite the data in the original sheet or creating a copy of the original sheet and update?
I will be changing the below "projects" and "Milestones" for actual data once I can understand the structure for this.

Table 2 show the results I am expecting, thanks again for any guidance where to start from.

Table 1
ProjectJun-17Jul-17Aug-17Sep-17MilestonesPhase
Project 1M1 M3M11
Project 2M1M2M3M4M21
Project 3 M1 M2M32
Project 4M1 M5M42
Project 5M2 M3M53
Project 6M4 M5
Table 2
ProjectJun-17Jul-17Aug-17Sep-17
Project 11112
Project 21122
Project 3 111
Project 41113
Project 51111
Project 62223

<colgroup><col><col span="4"><col><col><col></colgroup><tbody>
</tbody>

 
brill all working now, many thanks for your help with this much appreciated, just one last question how do you spot the "" in the blank cells as i can not see then still.
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
As you said you copy/pasted the data from the monthly view sheet, I looked at that & saw that you had formulae in there. And that in-itself told me that the cells in the test sheet weren't blank. Whilst they appear blank & =len(U2) will return 0, they aren't as shown by the isblank formula.

Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,189
Messages
6,129,403
Members
449,509
Latest member
ajbooisen

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