• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Subtotal without subtotalling?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Originally posted by LisaContractorUmbrella View Post
    A Employee ID B Month C Amount D Total for Month (Calc: =IF(AND(A2=A1,B2=B1),0,C2)

    1235 1 25.00
    1235 1 15.00 40.00
    1235 2 25.00 25.00
    1235 3 125.00 125.00
    2569 2 25.00
    2569 2 15.00 40.00
    2569 3 300.00
    2870 3 25.00 325.00

    What I need is a calculation in column E which will sum Column D at each change of reference in column A

    I spent ages lining up all those numbers which now look fine whilst I am editing but all group together when I post
    There you go

    Code:
    A Employee ID             B Month        C Amount          D 
    Total for Month (Calc: =IF(AND(A2=A1,B2=B1),0,C2)
    
    1235                              1                   25.00 
    1235                              1                   15.00            40.00
    1235                              2                   25.00            25.00
    1235                              3                 125.00           125.00
    2569                              2                   25.00
    2569                              2                   15.00            40.00 
    2569                              3                 300.00 
    2870                              3                   25.00           325.00

    Comment


      #22
      Thanks Mudskipper you're a great help
      Connect with me on LinkedIn

      Follow us on Twitter.

      ContractorUK Best Forum Advisor 2015

      Comment


        #23
        OK I am experimenting with data, I see that you need to have totals for each employee for each month as well as totals for the each employee for all months - right?

        So the first one you have in column D already and you want the second in column E.

        How important is it to have those values in those columns, can there be somewhere else? What is it you need to do with this data afterwards?
        This default font is sooooooooooooo boring and so are short usernames

        Comment


          #24
          Originally posted by LisaContractorUmbrella View Post
          Have tried a couple of times and get the same result - when there was less data it would take around 45 minutes to enter the subtotals so am pretty sure it's just shear volume combined with nested Vlookup functions which I understand take up a lot of processing power
          But have you tried switching it off and back on again...
          Don't believe it, until you see it!

          Comment


            #25
            Originally posted by MPwannadecentincome View Post
            OK I am experimenting with data, I see that you need to have totals for each employee for each month as well as totals for the each employee for all months - right?

            So the first one you have in column D already and you want the second in column E.

            How important is it to have those values in those columns, can there be somewhere else? What is it you need to do with this data afterwards?
            Yep you've got it. The data can't really be anywhere else as I need to be able to view names and reference numbers which are attached to the data. Once this is resolved I need to vlookup corresponding data on another worksheet and then compare the two figures to give a variance i.e. the difference in totals for each reference number on the two worksheets.
            Connect with me on LinkedIn

            Follow us on Twitter.

            ContractorUK Best Forum Advisor 2015

            Comment


              #26
              Originally posted by LisaContractorUmbrella View Post
              Not familiar with loops at all Quite happy to record macro's but not really any good at writing them! Can kind of understand what you've written - will this still work if the number of rows vary? I can't give a definitive end point
              I see there is a decent solution to this. But anyway. Yes there are various ways to determine the last row of data so the loop would not be fixed.
              You seem to be doing a lot of complex Excel work...might think about dropping a VBA training course leaflet to the manager. I think it would be worth it.
              McCoy: "Medical men are trained in logic."
              Spock: "Trained? Judging from you, I would have guessed it was trial and error."

              Comment


                #27
                Originally posted by lilelvis2000 View Post
                I see there is a decent solution to this. But anyway. Yes there are various ways to determine the last row of data so the loop would not be fixed.
                You seem to be doing a lot of complex Excel work...might think about dropping a VBA training course leaflet to the manager. I think it would be worth it.
                Ok thanks for that - yes, you're right a VBA training course would probably be a good idea
                Connect with me on LinkedIn

                Follow us on Twitter.

                ContractorUK Best Forum Advisor 2015

                Comment


                  #28
                  Originally posted by lilelvis2000 View Post
                  I see there is a decent solution to this. But anyway. Yes there are various ways to determine the last row of data so the loop would not be fixed.
                  You seem to be doing a lot of complex Excel work...might think about dropping a VBA training course leaflet to the manager. I think it would be worth it.
                  Lisa is the manager...
                  merely at clientco for the entertainment

                  Comment


                    #29
                    Originally posted by eek View Post
                    Lisa is the manager...
                    Actually I'm the Managing Director I also love spreadsheets which is why I still get involved with this stuff (probably much to the annoyance of the team who'd far rather I was off playing golf or something )
                    Connect with me on LinkedIn

                    Follow us on Twitter.

                    ContractorUK Best Forum Advisor 2015

                    Comment


                      #30
                      Originally posted by LisaContractorUmbrella View Post
                      Actually I'm the Managing Director I also love spreadsheets which is why I still get involved with this stuff (probably much to the annoyance of the team who'd far rather I was off playing golf or something )
                      I was going to say manager and owner but then remembered that its part of your brother's SJD group.

                      Did you get your company horse in the end?
                      Last edited by eek; 12 September 2014, 13:09.
                      merely at clientco for the entertainment

                      Comment

                      Working...
                      X