I am trying to create a custom footer based off parts of the sheet names. Below are the instructions for what I am trying to build. I recorded a macro that could pull the sheet name and page number, but as you can see I need more customization.


  1. Create footers:
    1. Customer footer
    2. Right footer
    3. Format: Times New Roman, 10, Bold, Red

      1. IF sheet name has ‘.’ = ['Sheetname before ‘.’' + '.' + 'Page number']
      2. IF sheet name doesn’t have ‘.’ = ['Sheet name before ‘ ‘' + '.' + 'Page number']


I recorded a macro that could pull the sheet name and page number, but as you can see I need more customization.

I also attached an example file and a word document with the macro code for simply pulling sheet name + page number.

If anyone could provide guidance or speak to the feasibility of this it would be more than appreciated!!

CustomerFooters.xlsb
FooterMacro.docx
FooterPreview.jpg