Using Right(cellsxxxxxx) in LeftHeader

chefdt

Board Regular
Joined
Jul 1, 2008
Messages
163
I've spent way too much time trying to figure this out and need some help.

Trying to force my header to read the RIGHT 7 characters from cell I1



Code:
ActiveSheet.PageSetup.LeftHeader = _
    Format(Worksheets("SHEET 1").Right(Cells(1, 9), 7).Value)
 
Assuming your SHEET 1 is actually Sheet1 try

Code:
Sub xxxxff()
ActiveSheet.PageSetup.LeftHeader = _
    Right(Worksheets("Sheet1").Cells(1, 9), 7)
 ActiveSheet.PrintPreview
End Sub
 
Upvote 0

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