+ Reply to Thread
Results 1 to 8 of 8

Copying to wrong Column

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    14

    Copying to wrong Column

    I have modified this micro I found in a forum. All I changed was the Range on Sheet 1.
    Please Login or Register  to view this content.
    It works fine except when it cuts to sheet 2 it starts at on column B I need it to start with Column C.
    What do I need to add ?
    Attached Files Attached Files
    Last edited by bodwhat; 10-22-2013 at 01:42 PM. Reason: code tags

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Copying to wrong Column

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added them for you this time. Please read our rules and abide by them in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copying to wrong Column

    Hi, bodwhat,

    no data in Sheet1 makes it hard to check the contents.

    Could you explain why you start with Row 7?

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    09-17-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    14

    Smile Re: Copying to wrong Column

    I started with Row 7 just to allow me room to add fields in. (Title / Header / Instruction / etc.)

    On Sheet 1 Column C is where they Student will enter in # 0 - 5. 5 being great 0 being poor (something like that)

    Then with a Ctrl + M key it will copy the data to sheet 2 starting with Column C and go to the next empty column when the next clint fills out the form.

    Im working out Column C Row 6. Starting with # 1 then when the next student fills it out it changes to 2,3,4, etc. This will alow me to mark in there recods what column they answered in.
    Any ideas ?

    This is all down in the office.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copying to wrong Column

    Hi, bodwhat,

    if rows 1 to 7 are empty you should check the first row with constant data to get the last filled column and work from there on to find the next column to write to which means you should check with row 8 in Sheet2.

    Ciao,
    Holger

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copying to wrong Column

    Hello bodwhat,

    It works fine except when it cuts to sheet 2 it starts at on column B I need it to start with Column C.
    What do I need to add ?
    May it be that you find "End(xlToLeft).Offset(0, 2)", a bit confusing?

    If you want to specify a specific range to Cut from and Paste to you could simply use:

    Please Login or Register  to view this content.
    Regards
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copying to wrong Column

    Hi, Wionon,

    you would need to make sure to insert a new column in the destination sheet prior to copying - or you simply overwrite as per your code when performing the code a couple of times.

    Ciao,
    Holger

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copying to wrong Column

    @ HaHoBe,

    Hello Holger,

    Nice to see you around again!

    Yes, I am aware of that, thank you, but I am merely trying to apply a, step by step, inroduction of how to start with the bare basics, and then build up from there.

    That is why I have stated in my post, two main qualifiers as to why I offered the most basic Code to start with, namely;

    1.
    May it be that you find "End(xlToLeft).Offset(0, 2)", a bit confusing?
    and

    2.
    If you want to specify a specific range to Cut from and Paste to you could simply use:
    Using what the OP is familiar with.

    Please stay with me on this one, and let us see how best we may be able to widen the horizons of any less knowledgable VBA users.

+ 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. Macro copying and pasting "wrong" columns with AutoFilter
    By MattWilson79 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2012, 12:33 PM
  2. Macro - wrong column reference
    By chemoul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2012, 11:22 PM
  3. Line spacing wrong when copying over to word
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2011, 04:34 PM
  4. Wrong column data recognized
    By Michael Wise in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2008, 11:42 AM
  5. Value from wrong column
    By KA_Analyst in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2007, 08:15 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