Insert cell content into footer

Solved
Floki72450 Posted messages 45 Status Member -  
Floki72450 Posted messages 45 Status Member -
Hello,

Here, I have a file with two title cells at the top of the document:
in C1: NAME OF THE SITE
in C3: ADDRESS OF THE SITE

And I would like the content of both cells to be inserted into my footer, both aligned to the left, one on top of the other, like this:

NAME OF THE SITE
ADDRESS OF THE SITE

I have already written this VBA code:

Sub UpdateFooter()
ActiveSheet.PageSetup.LeftFooter = Range("C1").Value
ActiveSheet.PageSetup.CenterFooter = Range("C3").Value
End Sub


But this places the name on the left and the address in the center, how can I stack these two contents?

Thank you in advance to all of you

Best regards

2 answers

  1. Maurice
     
    Hello

    Modification of your macro

    Sub UpdateFooter()
    ActiveSheet.PageSetup.LeftFooter = Range("C1").Value & vbLf & Range("C3").Value
    End Sub

    See you
    Maurice
    1
    1. Floki72450 Posted messages 45 Status Member
       
      Thank you for your response. If I understand correctly, "Range" means "line" and "vbLf" specifies changing lines?
      And if I now want to highlight, or double highlight one of the values, C1 or C3, how can I do that?

      Thanks again.
      0