+ Reply to Thread
Results 1 to 10 of 10

automating cut and paste?

  1. #1
    Registered User
    Join Date
    12-12-2006
    Posts
    63

    automating cut and paste?

    hi,

    ok, my spreadsheet looks something like this;

    6 Aldershot
    1 Aldershot
    7 Aldridge-Brownhills
    2 Aldridge-Brownhills
    8 Altrincham & Sale W
    3 Altrincham and Sale West

    and I want it to look like this;

    6 Aldershot 1 Aldershot
    7 Aldridge-Brownhills 2 Aldridge-Brownhills
    8 Altrincham & Sale W 3 Altrincham and Sale West


    is this possible without manually cutting and pasting? Also, some of the data is similar but not exactly the same.

    ON EDIT: I should point out that I only want to cut and paste the data to columns C & D if it is the same/similar to the data directly above it (before cut and pasting).

    thanks
    Liam
    Last edited by LiamF; 03-14-2007 at 12:56 PM.

  2. #2
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by LiamF
    hi,

    ok, my spreadsheet looks something like this;

    6 Aldershot
    1 Aldershot
    7 Aldridge-Brownhills
    2 Aldridge-Brownhills
    8 Altrincham & Sale W
    3 Altrincham and Sale West

    and I want it to look like this;

    6 Aldershot 1 Aldershot
    7 Aldridge-Brownhills 2 Aldridge-Brownhills
    8 Altrincham & Sale W 3 Altrincham and Sale West


    is this possible without manually cutting and pasting? Also, some of the data is similar but not exactly the same.

    ON EDIT: I should point out that I only want to cut and paste the data to columns C & D if it is the same/similar to the data directly above it (before cut and pasting).

    thanks
    Liam
    Hi see the attached file
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-12-2006
    Posts
    63
    Quote Originally Posted by starguy
    Hi see the attached file

    Thanks, it's weird but this works on one or two rows of data but mostly i'm getting the #VALUE! in the cell.

    Also, I didn't really make it clear that, for example, that;

    6 Aldershot

    the "6" and "Aldershot" are in different cells ie. Column A & B


    regards
    Liam

  4. #4
    Forum Contributor
    Join Date
    08-19-2006
    Posts
    116
    Quote Originally Posted by LiamF
    hi,

    ok, my spreadsheet looks something like this;

    6 Aldershot
    1 Aldershot
    7 Aldridge-Brownhills
    2 Aldridge-Brownhills
    8 Altrincham & Sale W
    3 Altrincham and Sale West

    and I want it to look like this;

    6 Aldershot 1 Aldershot
    7 Aldridge-Brownhills 2 Aldridge-Brownhills
    8 Altrincham & Sale W 3 Altrincham and Sale West


    is this possible without manually cutting and pasting? Also, some of the data is similar but not exactly the same.

    ON EDIT: I should point out that I only want to cut and paste the data to columns C & D if it is the same/similar to the data directly above it (before cut and pasting).

    thanks
    Liam
    Hi

    Try with this macro
    Please Login or Register  to view this content.
    It works only if the rows are the same two by two.For example, if you write:
    6 Aldershot
    1 Aldershot
    8 Aldershot

    in this case, the macro doesn't work because of the third row.

  5. #5
    Forum Contributor
    Join Date
    08-19-2006
    Posts
    116
    I saw that you wrote "the "6" and "Aldershot" are in different cells ie. Column A & B", then use this macro

    Please Login or Register  to view this content.
    You'll have 4 columns: 6 in A1, Aldershot in B1, 1 in C1 and Aldershot in D1.

  6. #6
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by LiamF
    Thanks, it's weird but this works on one or two rows of data but mostly i'm getting the #VALUE! in the cell.

    Also, I didn't really make it clear that, for example, that;

    6 Aldershot

    the "6" and "Aldershot" are in different cells ie. Column A & B


    regards
    Liam
    see the attached file.
    note that you need to put the matching values (i-e same values) in each appearance
    e.g if you enter Altrincham and Sale West first time then you should not enter it as Altrincham & Sale W.
    it means text in col B should be with same words at each of its appearance in col B.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-12-2006
    Posts
    63
    Quote Originally Posted by starguy
    see the attached file.
    note that you need to put the matching values (i-e same values) in each appearance
    e.g if you enter Altrincham and Sale West first time then you should not enter it as Altrincham & Sale W.
    it means text in col B should be with same words at each of its appearance in col B.

    OK, that works although it puts the result all in one cell eg. Column C.
    Anyway to avoid that? so that ;

    1 Aldershot

    are in different Columns (C & D)


    thanks
    Liam

  8. #8
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by LiamF
    OK, that works although it puts the result all in one cell eg. Column C.
    Anyway to avoid that? so that ;

    1 Aldershot

    are in different Columns (C & D)


    thanks
    Liam
    see the attach file (more comprehensive)
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-12-2006
    Posts
    63
    still not quite there with this. See if my attached spreadsheet makes any sense.

    many thanks
    Liam
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by LiamF
    still not quite there with this. See if my attached spreadsheet makes any sense.

    many thanks
    Liam
    Hi LiamF

    download file from link below

    http://www.megaupload.com/?d=2UOCMGK0

+ 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