Solved

Excel Formular to pull Footer

Posted on 2011-09-21
5
238 Views
Last Modified: 2012-05-12
The footnote contain information. Is there a formular that will pull the footnote?


Example: if the footnote said Boat 234, the formular would pick this up in a cell that is written with a formular.
0
Comment
Question by:Mighty1072
  • 2
  • 2
5 Comments
 
LVL 41

Accepted Solution

by:
dlmille earned 250 total points
ID: 36575095
In VBA, you can use:


ActiveSheet.PageSetup.LeftFooter, ActiveSheet.PageSetup.CenterFooter, and ActiveSheet.PageSetup.RightFooter
 

See example attached - I created a function you can use (copy Module1 to your workbook):

=getFooter(1) 'to get leftFooter (use 2 for center, and 3 for right)

here's the code:
 
Function getFooter(which As Integer)

    On Error GoTo errHandler
    
    Select Case which:
        Case 1:
            getFooter = ActiveSheet.PageSetup.LeftFooter
        Case 2:
            getFooter = ActiveSheet.PageSetup.CenterFooter
        Case 3:
            getFooter = ActiveSheet.PageSetup.RightFooter
        Case Else:
            getFooter = ""
    End Select
    
    Exit Function
    
errHandler:
    getFooter = ""
End Function

Open in new window


See attached.

Enjoy!

Dave
getFooter-UDF-r1.xls
0
 
LVL 5

Expert Comment

by:slycoder
ID: 36575475
After a small tweak to Dave's solution - you can return all three of them in a single call:

Function getFooter()

    'On Error GoTo errHandler
   
    getFooter = ""
   
    getFooter = ActiveSheet.PageSetup.LeftFooter & " " & _
                ActiveSheet.PageSetup.CenterFooter & " " & _
                ActiveSheet.PageSetup.RightFooter
   
    getFooter = Trim(getFooter)
   
    Exit Function
   
errHandler:
    getFooter = ""
End Function
0
 
LVL 5

Assisted Solution

by:slycoder
slycoder earned 250 total points
ID: 36575480
you would use

=getFooter()

to call this function.



Thanks
0
 

Author Closing Comment

by:Mighty1072
ID: 36576267
Not exactly what I am looking for. But I have found a different solution.

Thanks guys
0
 
LVL 41

Expert Comment

by:dlmille
ID: 36576302
That's great.  Please share your other solution.

Dave
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel Pivot Chart - Need to show sum of totals 3 18
VLOOKUP 6 17
Copying from excel I am getting extra text 11 43
Declaring dynamic table and naming it . 2 22
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question