OK, so take the case of the same task with different data, what I propose is that instead of coding the whole script you save your interactive Excel session with the first set of data, do some cleaning on it and voila you have your script that you can run later for other inputs.