Mrs S,
I agree with Jeroen: if you want to output to Excel then VBA is probably the right tool. It is built in to excel and the programming interface is accessed by pressing alt+F11.
For your needs I suggest you look at custom functions rather than subroutines.
Subroutines are either run from the macro menu or by keyboard short cut. Custom functions can be entered into cells like the built in functions. I have used them to create data queries.
If you have the data in excel already oftem you can often achieve better results than pivot tables with a combination of INDEX, MATCH, SUMIF and MMULT.
HTH
EG