Sum above in Excel 2000

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grego9
    New Member
    • Feb 2007
    • 63

    Sum above in Excel 2000

    I have the following code - where I am trying to enter a sum of the cells above formula wherever there is a blank in column J. It keeps failing on the second to last line of the code - as it doesn't seem to recognise the the sum(above) formula - any ideas - it may be that this function isn't supported in Excel 2000 - if not are there any other ways to achieve this?


    Dim MyRangesum As Range, DelRangesum As Range, Fsum As Range
    Dim MatchStringsum As String, SearchColumnsum As String, ActiveColumnsum As String
    Dim FirstAddresssum As String, NullChecksum As String
    Dim AFsum

    Set MyRangesum = Columns("J")

    Set Fsum = MyRangesum.Find (What:="", After:=MyRanges um.Cells(1), LookIn:=xlValue s, Lookat:=xlPart)
    If Not Fsum Is Nothing Then
    Set DelRangesum = Fsum
    FirstAddresssum = Fsum.Address
    Do
    Set Fsum = MyRangesum.Find Next(Fsum)
    Set DelRangesum = Union(DelRanges um, Fsum)
    Loop While FirstAddresssum <> Fsum.Address
    End If

    'If there are valid matches then insert the rows


    If Not DelRangesum Is Nothing Then DelRangesum.Act iveCell.Formula Formula:="=Sum( above)"
    Application.Scr eenUpdating = True
Working...