+ Reply to Thread
Results 1 to 12 of 12

Copying cells to the neighbouring column in pairs along Row 1

  1. #1
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Copying cells to the neighbouring column in pairs along Row 1

    Hi,

    So I have a spreadsheet that has a Title in Cell A1, then entries in B1, D1, F1, H1, J1, etc... with empty cells between.

    What I would like to do is copy those entries to the right, i.e. B1 into C1, D1 into E1, F1 into H1, but all the way along because in my master sheet there are a lot of columns.

    The attached spreadsheet shows exactly what I'm hoping for; any help is much appreciated!

    Many thanks,

    Tim
    Attached Files Attached Files
    Last edited by shmee150; 03-13-2009 at 12:23 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Try this
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Quote Originally Posted by royUK View Post
    Try this
    Please Login or Register  to view this content.
    Ok that kinda works. It does it all except the last entry, is there an easy way to get that done?

    Many many thanks!

    Tim

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copying cells to the neighbouring column in pairs along Row 1

    What last entry?

  5. #5
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Ahh another problem, sometimes they aren't actually empty, it's like every even column (B, D, F, H, J, L, N, P...) wants to be copied to the next odd one, rather than just filling in when empty.

    Thanks,

    Tim

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Is this what you mean?
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Re: Copying cells to the neighbouring column in pairs along Row 1

    It's almost right, something isn't right however in my spreadsheet, I'm trying to work out what I need to change, I'll get there eventually!

    Thanks,

    Tim

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copying cells to the neighbouring column in pairs along Row 1

    I'm sure the code does what you asked.

  9. #9
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Yes yes, it does in that spreadsheet. i just can't figure why it isn't working in my main one, but unfortunately I can't give you that! It's something to do with having multiple sheets and it seems to always do one of the wrong ones.

    Tim

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copying cells to the neighbouring column in pairs along Row 1

    The code that I have given you will only work on the active sheet. You never mentioned multiple sheets

  11. #11
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Quote Originally Posted by royUK View Post
    The code that I have given you will only work on the active sheet. You never mentioned multiple sheets
    It should be the active sheet though, is there something easy that can be done to ensure it does it specifically for the sheet called "output", I can't seem to crack it, and it's rather annoying because every time it goes wrong of course I have messed up the data on an important sheet!

    Thank you for your help!

    Tim

  12. #12
    Registered User
    Join Date
    06-25-2007
    Posts
    45

    Re: Copying cells to the neighbouring column in pairs along Row 1

    Ok I've got it, thanks!

+ 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