Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to lookup a value in a different sheet, and insead of having
excel return specific values within that sheet, I would like for it to return the Footer value. Is this possible? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, you can do this. You just need a little VBA code:
Sub HeaderFooterSummary() Dim ws As Worksheet, l As Long, PSinfo(1 To 7) As String Application.ScreenUpdating = False 'prevent screen flicker during processing With Sheet1 'amend sheet as required or add a new one if needed l = 1 'the row counter .Cells(l, 1).Value = "Sheet Name" .Cells(l, 2).Value = "Left Header" .Cells(l, 3).Value = "Centre Header" .Cells(l, 4).Value = "Right Header" .Cells(l, 5).Value = "Left Footer" .Cells(l, 6).Value = "Centre Footer" .Cells(l, 7).Value = "Right Footer" 'the headings For Each ws In Worksheets l = l + 1 With ws PSinfo(1) = .Name 'the sheet name With .PageSetup PSinfo(2) = .LeftHeader PSinfo(3) = .CenterHeader PSinfo(4) = .RightHeader PSinfo(5) = .LeftFooter PSinfo(6) = .CenterFooter PSinfo(7) = .RightFooter End With 'the pagesetup info End With .Range(.Cells(l, 1), .Cells(l, 7)).Value = PSinfo 'pass array info to range on summary sheet Next .Columns("A:G").AutoFit 'resize columns as needed End With Application.ScreenUpdating = True End Sub If you don't know much about VBA, or know nothing about it, take a look at this: http://www.anthony-vba.kefra.com/vba...ur_First_Macro Regards, Ryan--- -- RyGuy "jdwyer" wrote: I am trying to lookup a value in a different sheet, and insead of having excel return specific values within that sheet, I would like for it to return the Footer value. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to display current page number in any cell of that page. | Excel Discussion (Misc queries) | |||
adding number only if CDN is displayed in next cell | New Users to Excel | |||
sheet tabs as page number and in a cell page of pages? | Excel Discussion (Misc queries) | |||
Can I remove the "page and number" displayed on Excel spreadsheet | Excel Discussion (Misc queries) | |||
Count number of times a specific number is displayed in a cell ran | Excel Worksheet Functions |