[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Excel Formular to pull Footer

Posted on 2011-09-21
5
Medium Priority
?
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 42

Accepted Solution

by:
dlmille earned 750 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 750 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 42

Expert Comment

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

Dave
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

650 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