• 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!

Excel Group & Merge Question

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

    Excel Group & Merge Question

    I am by no means an Excel pro so maybe someone out there can help me.

    I want to transform the table below from (a and b are columns)...
    ab
    13
    14
    15
    26
    27
    28

    to this by selecting each section and merging...the "-" are blank cells by the way.

    ab
    -3
    14
    -5
    -6
    27
    -8

    Now I know I can manually group and merge each section (in column a)....but the problem is my table is 30000 rows and it would take for ever. Can I do this automatically via a routine VBA or Macro or anything else?? I have searched all over the net but have found nothing.
    Last edited by Lowery; 29 April 2007, 18:21.

    #2
    ???
    What happens in General, stays in General.
    You know what they say about assumptions!

    Comment


      #3
      yep it was hard to explain.....

      I need to select all the "1" in column a....merge....select all the "2" ....merge.... and so on for 30000 rows....

      Comment


        #4
        Can you not do this with a pivot table?
        What happens in General, stays in General.
        You know what they say about assumptions!

        Comment


          #5
          Edit: I see what you mean. Gimme 5 minutes.

          Edit2: No I don't there is no logical way why the data is organised like that in the second table.

          Are you saying you want it to go

          04
          06
          07
          11
          12
          13
          25
          26

          to become

          04
          -6
          -7
          11
          -2
          -3
          25
          -6
          Last edited by Sockpuppet; 29 April 2007, 18:44.

          Comment


            #6
            Exactly right ....

            I see what you mean on not logical. After the merge has happened I want to align the text (in your example 0, 1 and 2) in the centre of the merged cell. That should be easy.

            Tried a pivot table and also exporting to Excel from Access but still couldn't get there.
            Last edited by Lowery; 29 April 2007, 18:55.

            Comment


              #7
              =IF(A2=A1,TEXT(A2,"0"),TEXT(A2,"0")&TEXT(B2,"0"))

              Start Data must be in row 2. Put formula in c2, drag down


              A B C
              1 1 11
              1 2 1
              1 3 1
              2 5 25
              2 6 2
              3 4 34
              3 6 3
              3 7 3
              What happens in General, stays in General.
              You know what they say about assumptions!

              Comment


                #8
                Thats why MF gets paid the big bucks.

                Comment


                  #9
                  Why he wants to do it god knows????
                  What happens in General, stays in General.
                  You know what they say about assumptions!

                  Comment


                    #10
                    Originally posted by MarillionFan
                    Why he wants to do it god knows????
                    His teacher set some homework?

                    Comment

                    Working...
                    X