+ Reply to Thread
Results 1 to 11 of 11

Saving two non-consecutive columns

  1. #1
    Registered User
    Join Date
    06-12-2008
    Posts
    19

    Saving two non-consecutive columns

    Hi,

    I have Excel 2000.

    If I have columns A B C D E how do I copy A and C only (at the same time) and paste them into a new workbook? I get a popup saying it's not possible.

    I don't want to copy one column at a time in case I make a mistake and item 1 in column A no longer lines up with item 1 in column C (I'll be performing this at least daily and the results will go on a website)

    Thanks!

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Quote Originally Posted by AnotherExcelNb
    Hi,

    I have Excel 2000.

    If I have columns A B C D E how do I copy A and C only (at the same time) and paste them into a new workbook? I get a popup saying it's not possible.

    I don't want to copy one column at a time in case I make a mistake and item 1 in column A no longer lines up with item 1 in column C (I'll be performing this at least daily and the results will go on a website)

    Thanks!
    Hi

    It is possible but the two copied ranges have to be the same length

    Cheers
    Last edited by arthurbr; 06-13-2008 at 04:49 AM.

  3. #3
    Registered User
    Join Date
    06-12-2008
    Posts
    19
    How do I do it then, please?

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Select your first range while pressing the Ctrl Key
    Then select the second range still holding the key down( same range length)
    Ctrl+C
    Go to your new sheet
    Paste

    That's it

  5. #5
    Registered User
    Join Date
    06-12-2008
    Posts
    19
    Thank you!

    That was easy.

    I now have A and C next to each other
    I've inserted a new column between them so that I now have A B C
    B is blank
    I want to populate B with the same character

    For example:
    A B C
    1 z a
    2 z b
    3 z c
    4 z d

    Is there a quick way of doing that rather than doing it manually?

    Thank you again

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    just enter what you want in first cell and the one below it
    then select both cells. left click on bottom right (small black square), keep mouse button pressed and drag down the column
    or highlite the cells in the column required
    type character
    then ctrl+enter
    Last edited by martindwilson; 06-13-2008 at 08:55 AM.

  7. #7
    Registered User
    Join Date
    06-12-2008
    Posts
    19
    That's clever.

    My next problem is that I don't want to use any old character, but a double arrow =>

    When I try to populate the cells by the method martindwilson describes it basically won't let me, presumably because this is a character that Excel uses. It's not the end of the world, because I could populate the cells with something like zzz and then save it to text and do a search and replace

    I'm aiming for a text file like this

    1 => 6
    2 => 11
    3 => 4
    4 => 17

    i.e. an array that can be used in php

    Still, it might be one last task to do. Is there a way to populate the cells with a double arrow? =>

    Thanks again

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    ok if your bits are in a1 and c1 try this in b1
    =A1&" => "&C1
    which you can then copy paste special values to anywhere you want
    on the spread sheet or just to a text file

    remove spaces between quotes if requireD
    you can click drag this down to autofill
    Last edited by martindwilson; 06-13-2008 at 09:56 AM.

  9. #9
    Registered User
    Join Date
    06-12-2008
    Posts
    19
    That is very, very cool.

    I had to put the =A1&" => "&C1 in the top bit immediately above the spreadsheet.

    Now - almost last thing - how do I get commas after the array?

    So that I end up with:

    1 => 5,
    2 => 7,
    5 => 11

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    =A1&" => "&C1&"," perhaps?
    the & simply joins the contents together , text has to be inside quotes " "

  11. #11
    Registered User
    Join Date
    06-12-2008
    Posts
    19
    That works perfectly.

    Thanks very much for your help, and I'll leave it there!

+ 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