Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    adding columns and data from other cells (2003)

    Hello Everyone,
    I need some help. I am trying to move cells from one column to another and need to know if there is a macro or easier way of doing it other than cutting and pasting. The reason I am doing this is so I can sort and do other functions such as pivot tables. I am including an example of the data and output. Basically, I number of rows can vary from 1000 to 2000. Any help would be great. Thanks.
    Attached Files Attached Files

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: adding columns and data from other cells (2003)

    You can do it manually without a macro very easily:

    Insert col A and B

    In A1:
    =C1

    In B1:
    =C2

    In A2:
    =IF(ISBLANK(D2),C2,A1)

    In B2:
    =IF(ISBLANK(D2),C3,B1)

    Copy/Autofil A2:B2 down the column

    Copy A:B and paste-special values over the columns to get rid of the formulas

    Then you can sort on column D to change the values In A/Bfor the blank rows and headers, then resort on A/C

    Steve

  3. #3
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: adding columns and data from other cells (2003)

    Thanks Steve.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •