> is it possible to do it directly in the header/footer area?
No, that is not possible.
You can enter fixed text and predefined elements such as the date in page headers and footers. For other variable content, the only way is to write VBA code in the Workbook_BeforePrint event in the ThisWorkbook module.
Hi,
I agree with Hans, if you have further question about VBA coding, I recommend you post the question to MSDN forum:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George ZhaoTechNet Community Support