+ Reply to Thread
Results 1 to 13 of 13

totaling difficulties

  1. #1
    Registered User
    Join Date
    06-15-2005
    Posts
    5

    totaling difficulties

    tried posting a similar question on the newuser forum but since more people seem to view here thought it'd be worth trying to post here.

    i have a large worksheet with hundreds of names and then months of the year. there are no blank lines. what i want to do is total the figures (some cells are blank) under each month after each name. a name can appear once or many times.

    ideally what i want to do is at the change of a name insert 2 blank lines and use one line to total the figures for that name then have one as a separator. it was suggested i use subtotal function but i can't see how i can use it to add in blank lines, nor get it to calculate for each month for each name without manually typing in (or copying) a formula in thousands of cells.

    i was hoping there was a way to say on change of name calculate totals using numbers between last blank line and now. maybe an example would be more obvious:

    worksheet currently:

    name m1 m2 m3
    aaaa 03 01
    bbbb 01 01 02
    bbbb 01 02 01

    desired result:

    name m1 m2 m3

    aaaa 03 01
    total 03 01

    bbbb 01 01 02
    bbbb 01 02 01
    total 02 03 03

    suggestions appreciated,
    alison.

  2. #2
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  3. #3
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  4. #4
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  5. #5
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  6. #6
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  7. #7
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  8. #8
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  9. #9
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  10. #10
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  11. #11
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  12. #12
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




  13. #13
    Bob Phillips
    Guest

    Re: totaling difficulties

    Dim iLastRow As Long
    Dim i As Long

    Columns("A:D").Subtotal GroupBy:=1, _
    Function:=xlSum, _
    TotalList:=Array(2, 3, 4), _
    Replace:=True, _
    PageBreaks:=False, _
    SummaryBelowData:=True
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = iLastRow To 2 Step -1
    If Right(Cells(i, "A").Value, 5) = "Total" Then
    Cells(i + 1, "A").EntireRow.Insert
    End If
    Next i


    --
    HTH

    Bob Phillips

    "alisonmacd" <alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com> wrote
    in message news:alisonmacd.1r0q6j_1119427530.3505@excelforum-nospam.com...
    >
    > tried posting a similar question on the newuser forum but since more
    > people seem to view here thought it'd be worth trying to post here.
    >
    > i have a large worksheet with hundreds of names and then months of the
    > year. there are no blank lines. what i want to do is total the
    > figures (some cells are blank) under each month after each name. a
    > name can appear once or many times.
    >
    > ideally what i want to do is at the change of a name insert 2 blank
    > lines and use one line to total the figures for that name then have one
    > as a separator. it was suggested i use subtotal function but i can't
    > see how i can use it to add in blank lines, nor get it to calculate for
    > each month for each name without manually typing in (or copying) a
    > formula in thousands of cells.
    >
    > i was hoping there was a way to say on change of name calculate totals
    > using numbers between last blank line and now. maybe an example would
    > be more obvious:
    >
    > worksheet currently:
    >
    > name m1 m2 m3
    > aaaa 03 01
    > bbbb 01 01 02
    > bbbb 01 02 01
    >
    > desired result:
    >
    > name m1 m2 m3
    >
    > aaaa 03 01
    > total 03 01
    >
    > bbbb 01 01 02
    > bbbb 01 02 01
    > total 02 03 03
    >
    > suggestions appreciated,
    > alison.
    >
    >
    > --
    > alisonmacd
    > ------------------------------------------------------------------------
    > alisonmacd's Profile:

    http://www.excelforum.com/member.php...o&userid=24323
    > View this thread: http://www.excelforum.com/showthread...hreadid=381133
    >




+ 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