+ Reply to Thread
Results 1 to 31 of 31

copy entire column instead of rows

Hybrid View

  1. #1
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: copy entire column instead of rows

    Hi,
    . a bit of further input here:- out of interest I took a quick look back here...

    . As I said i am learning by doing these Threads and this was a Big Donkey of a code for me, multiple width row, and sheets etc..
    . FWIW, I guess I have confirmed that it was a good idea to take the implementation step by step..
    . Going from Our Post 24 25 point ... and looking at sheet Awaiting . Assume in the last column , I, in cell I1 ( dropdown box ) I select Move to Master Sheet....

    Using Excel 2007
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Awaiting
    Awaiting
    Move to Master List
    Remove
    2
    Name List
    Designation 1
    Designation 6
    Designation 7
    Designation 8
    Designation 9
    Designation 10
    Designation 11
    Designation 12
    3
    Name 1
    1
    51
    1
    11
    21
    31
    41
    51
    4
    Name 2
    2
    52
    2
    12
    22
    32
    42
    52
    5
    Name 3
    3
    53
    3
    13
    23
    33
    43
    53
    6
    Name 4 Nufink Nufink
    4
    14
    24
    34
    44
    54
    7
    Name 5
    5
    55
    Nufink Nufink Nufink Nufink Nufink Nufink
    8
    Name 6
    6
    56
    6
    16
    26
    36
    46
    56
    9
    Name 7
    7
    57
    7
    17
    27
    37
    47
    57
    10
    Name 8
    8
    58
    8
    18
    28
    38
    48
    58
    11
    Name 9
    9
    59
    Nufink Nufink Nufink Nufink Nufink Nufink
    12
    Name 10
    10
    60
    10
    20
    30
    40
    50
    60
    13
    Awaiting


    ... so I copied the Worksheet_change code to Awaiting sheet Code Module. But importantly at this stage deleted the Worksheet_change code in sheet Master List ( more to that later!!*** )

    . So plan is as, an example, Assume in the last column , I, in cell I1 ( dropdown box ) I select Move to Master Sheet....

    .. A point that immediate struck me is that in Awaiting column H and I have no check box In!!! So that didn’t work!!!
    ... obvious Point – as columns were shifted across no account is taken of that.
    . copying ( manually for now ) across reveals a further obvious point*** - Any change anywhere sets off the Worksheet-change Program and or programs!!***

    ... But for now .. I take the above and select Move To Master List in cell I1.. ...
    . Follow through F8 Debug... then “suck it and see”

    . - Problem 1)
    . ... Typo:....( Mine )
    Move To Master
    is wrong in code: should be
    Move to Master List
    .....
    ....
    . - Problem 2)
    We use the CurrentRegion Property, which Applied to a range Object returns a Range of the "box" which extends to include all cells connected to That Range. Currently Master list has nothing in first row, which of course can happen, ! so CurrentRegion Property does not catch first row!!
    . - Ok for now put in all sheets in cell (1, 1 ) Anything:
    Using Excel 2007
    Row\Col
    A
    B
    1
    AnyThink
    2
    Name List
    Designation 2
    3
    Name 1
    11
    Master List

    ..............
    Now the complete running of the program gives me this ( partial screen shots )

    Using Excel 2007
    Row\Col
    H
    I
    1
    Remove
    2
    Designation 11
    3
    41
    4
    42
    5
    43
    6
    44
    7
    Nufink
    8
    46
    9
    47
    10
    48
    11
    Nufink
    12
    50
    Awaiting

    .. column I is gone from Sheet Awaiting as expected, and ................
    Using Excel 2007
    Row\Col
    A
    B
    C
    D
    1
    AnyThink
    Move to Master List
    2
    Name List
    Designation 12
    Designation 2
    Designation 3
    3
    Name 1
    51
    11
    21
    4
    Name 2
    52
    12
    22
    5
    Name 3
    53
    13
    23
    6
    Name 4
    54
    Nufink Nufink
    7
    Name 5 Nufink
    15
    25
    8
    Name 6
    56
    16
    26
    9
    Name 7
    57
    17
    27
    10
    Name 8
    58
    18
    28
    11
    Name 9 Nufink
    19
    29
    12
    Name 10
    60
    20
    30
    Master List
    ... is squeezed in at the second column in Sheet Masta List

    .... I think this is getting there.. I was actually expecting more difficult problems: These couple are just carelessness / lack of experience on my behalf. I think my main concern was with some possible sorting and order requirements with actual data..
    ... but I will leave it at that stage for now, pending any feedback or my next urge to tidy up / recheck further the code.

    Alan..
    Last edited by Doc.AElstein; 09-10-2015 at 04:58 PM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 05-30-2015, 04:38 PM
  2. Alter existing formula to copy specific cells in row instead of copy entire column
    By painterartist in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-02-2014, 12:42 PM
  3. Search string in a column then copy entire rows to another sheet
    By vannylette in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2013, 12:16 PM
  4. Replies: 1
    Last Post: 11-16-2012, 05:05 PM
  5. [SOLVED] Copy Entire Column Only Returning 1st 16 Rows?
    By rwr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2012, 11:38 AM
  6. [SOLVED] Macro to Copy Entire Rows if Column Equals
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2012, 09:46 PM
  7. Replies: 0
    Last Post: 02-06-2009, 02:45 AM

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