Footer Linked Range (Multiple Cells)

Johnbrowning9

New Member
Joined
Mar 31, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I would like to be able to have a footer that is linked to a range on the same sheet (AL1:AM4). (If possible) Or if it is not able to, just a way to stack the cells and create multiple rows

The Current code I created allows me to do this but it is in a single line.

Example
1617207444011.png


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Sh As Worksheet
For Each Sh In Me.Worksheets
Sh.PageSetup.LeftFooter = ActiveSheet.Range("AL1").Text + " " + ActiveSheet.Range("AL2").Text + " " + ActiveSheet.Range("AM2").Text + " " + ActiveSheet.Range("AL3").Text + " " + ActiveSheet.Range("AM3").Text + " " + ActiveSheet.Range("AL4").Text + " " + ActiveSheet.Range("AM4").Text


Next Sh
End Sub

I am trying to get it to look like this
1617207577062.png

I have no idea how to get them to stack (If that is even what you call it) . The cells are linked in the macro just side by side and not on top of each other.

Just looking for some help.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi & welcome to MrExcel.
Try replacing some of the " " with vbLf
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,412
Messages
6,119,365
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top