PDA

View Full Version : Changing dates in a cell



austenr
07-31-2010, 01:36 PM
In the WB attached, if I enter data in cells D7 thru D9 of the Input + Wksheet worksheet when I first open the WB and press the calculate button I get the desired results on the CP1 sheet. However, say you do the described steps above and want to do another calculation simply by changing the dates in D7 thru D9. If I do that and press the calculate button, on the CP1 sheet I get N/A.

The only way to get the correct answer in the CP1 sheet is to clear it with the sub (the clear CP1 sheet button) and to clear the contents of D7 thru D9 on the Input + Wksheet worksheet every time you want to calculate a new person.

Any way around this?

Code is in a standard module Module1.

Bob Phillips
07-31-2010, 02:09 PM
It is because the YearsOfService cell, D10, is blank.