Solved

Excel Formular to pull Footer

Posted on 2011-09-21
5
214 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now