Does anyone know how to add user id to the Excel header or footer? I know I can set it in a macro but I'm trying to avoid it. Is there any shortcut like &D or &t for user id?
there is no formula (in the header dialogue, or in Excel in general) that pulls the username. You would have to do VBA.
The user or author is not a prebuilt field that can be inserted into a header/footer like
&[Page] for page number. The available header/footer elements are shown in the Header & Footer Tools, Design context menu (available once you are in View, Page Layout)
However, there are some prebuilt commands that will insert the current user as text (not an updateable field). Click the large Header menu button at the far left of the above image and insert <user> Page <page no> <date> or Prepared by <user> <date> Page <page no>. The same prepared phrases are available for the Footer.
These are accessed by Alt+J,H,H. They can also be assigned to the QAT or menu hotkey(s).