Results 1 to 7 of 7

Re-calculate cell everytime it is changed

Threaded View

Theodjinn Re-calculate cell everytime... 08-14-2008, 05:58 AM
Richard Buttrey I'm not clear why K4 isn't... 08-14-2008, 06:29 AM
Theodjinn What I mean by when it is... 08-14-2008, 06:56 AM
Phil_V I might be wrong, but I think... 08-14-2008, 07:26 AM
Theodjinn Absolutely brilliant! ... 08-14-2008, 07:50 AM
  1. #1
    Registered User
    Join Date
    08-11-2008
    Location
    Edinburgh
    Posts
    35

    Re-calculate cell everytime it is changed

    I have a spreadsheet where sheet("summary").Cells("K4") = sheet("component").Cells("G7").

    This is written as a formula, e.g. =SUM('Component'!G7).

    I am trying to achieve the same through VBA. I can get the summary cell to copy the others. but it just copies it the once when it is created. How can I make this re-calculate everytime it is changed?

    Sub PopulateTestsExecuted()
        
        ' Populates the Summary sheet with the tests executed per component
        Dim i As Integer, component As String, goHere As Range, fromHere As Range
        
        With frmGetSetUpData.lstComponents
            Set goHere = Sheets("Summary").Range("K4")
            For i = 0 To .ListCount - 1
            component = .List(i)
        
            Set fromHere = Sheets(component).Range("G7")
            goHere = fromHere
            
            Set goHere = goHere.Offset(i, 0)
            
            Next i
        End With
        
    End Sub
    Last edited by NBVC; 10-23-2008 at 04:30 AM.

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