Champaben, my job is heating up just now and I probably won't spend more than a few sentences at a time with you, not as much help as you'll need. Also I don't know anything about GoalSeek—never used it.
But I can answer one of your questions:
Quote:
I have to paste this code in every sheet, is there a way to put it on the work book
|
The Worksheet_Change subroutine will have to be on every sheet. But you can paste some simple code on every sheet that calls a central subroutine, and have
that central subroutine in a common place. That way, whenever you have to change the code, you change it in the central location and all the Worksheet_Change modules, by calling that subroutine, will stay up to date without you having to change each one of them.
I also suspect that only some of that code should be in VBA. Just at a glance, reading your description, it sounds to me as though some of what you're trying to do in VBA would be done more efficiently in worksheet formulae.
Vague generalities like that probably aren't much help to you, I know. But I hope someone else will come back and pay more specific attention. Meanwhile I hope my idea about the Worksheet_Change modules is some help. Feel free to ask more questions to force me to clarify.