+ Reply to Thread
Results 1 to 3 of 3

Formulas for the List Headers

Hybrid View

  1. #1
    Registered User
    Join Date
    12-10-2008
    Location
    Antarctica
    Posts
    9

    Formulas for the List Headers

    Would someone be able to give me a hand with the Excel list? Here is my problem: I would like to update a template I use monthly to create a financial projection report. One cell on the report indicates the reporting date. I need to report twelve months projection. The report header has twelve columns with formulas related to the reporting date in their headers. As soon as the report date updated all columns update their names as well. Please see the attachment, EXAMPLE 1. I would like to convert this report table to the list, but as soon as do this my formulas dissapear from the list headers and live just names. Please, see the attachment EXAMPLE 2. I fould tricky way to avoid this problem by adding additional row to the header and living names outside of the list, but I don't like it and it also affects the report view.
    1. Do you know if Excel list headers can include any formulas? (I can't find this information in the Excel Help).
    2. If they can, how can I load formulas?
    3. If they cannot, do you have any idea how I can let Excel update columns names according to the reporting date?
    Thank you.
    Attached Files Attached Files
    Last edited by San; 08-24-2009 at 11:24 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formulas for the List Headers

    Correct, the issue is down to the use of a Table/List which prevents the headers from containing formulae.

    How to circumvent whilst leaving both List & Header row in place ?

    Well possibly use VBA change event such that as the reporting date cell is altered so VBA is used to update the static dates in the header row, for ex. using your Example 2:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim lngMonth As Long
    On Error GoTo ExitHere
    If Target.Count > 1 Or Target.Address <> "$C$15" Then Exit Sub
    Application.EnableEvents = False
    If IsDate(Target.Value) Then
        For lngMonth = 0 To 11 Step 1
            Cells(17, 3 + lngMonth).Value = DateAdd("m", lngMonth, Target.Value)
        Next lngMonth
    End If
    ExitHere:
    Application.EnableEvents = True
    End Sub
    Ungainly but it might work.

  3. #3
    Registered User
    Join Date
    12-10-2008
    Location
    Antarctica
    Posts
    9

    Re: Formulas for the List Headers

    Thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1