Hi – I have been trying to work out a macro.
I am looking for a macro that will check 2 things....then do something.
The first is if a particular cell contains a given value. Lets say
should equal "Year 1" if true.
Next is if a range of cell values in are blank,
should be blank.
If both these are true then I want the macro to copy a range of cells from
If false then move on to the next range of cells (go on to “Year 2” and its corresponding range of cells) and perform this same check until True.
-I have five distinct ranges of cells starting with "Year 1" going through "Year 5" on Sheet1.
only belongs to Year 1. The label “Year 1” is in cell D3.
belongs to Year 2. The label “Year 2” is in cell I3.
-And so on...through Year 5.
-I have the Years listed in a combo box on Sheet2 (where I also have a button that activates this macro).
I have tried this code, BUT I can NOT get the macro beyond simply looking at “Year 1.” I am to unfamiliar with Looping and Next to make it work here.
Thanks for your help – Jim Ayers