+ Reply to Thread
Results 1 to 5 of 5

How to write a macro that pastes into next column if there is data in the assigned column

  1. #1
    Registered User
    Join Date
    09-14-2017
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    3

    Exclamation How to write a macro that pastes into next column if there is data in the assigned column

    Delete this thread please. Thank you for your help!
    Last edited by pot3; 09-14-2017 at 09:16 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to write a macro that pastes into next column if there is data in the assigned col

    Hi Pot,

    Try this:

    Please Login or Register  to view this content.
    BTW:
    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.

    Click on Edit to open your thread, then 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
    Last edited by xladept; 09-14-2017 at 09:13 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-14-2017
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    3

    Re: How to write a macro that pastes into next column if there is data in the assigned col

    Thank you so much! It didn't work unfortunately but is it ok if I attach you the excel sheet please? I truly appreciate you helping and giving me that tip! @xladept

  4. #4
    Registered User
    Join Date
    09-14-2017
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    3

    Re: How to write a macro that pastes into next column if there is data in the assigned col

    Attached is my sheet.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to write a macro that pastes into next column if there is data in the assigned col

    There were a couple of problems in the sheet names - Data had a trailing space and there was no space in wt.name.

    Let me know what's wrong with this:
    Attached Files Attached Files

+ 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. Need help with below Macro to write data end of column list
    By ikhan99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2016, 12:20 PM
  2. Macro that moves Formulas 1 column right and then Pastes Values into previous column
    By ExcelDavid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2014, 05:30 PM
  3. [SOLVED] Macro that pastes from the clipboard into the next empty cell in a column
    By Msimm14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2013, 02:14 AM
  4. Write a macro that filters, copies and pastes data according to a drop-down list
    By ClaraW89 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-19-2012, 08:43 AM
  5. [SOLVED] Automating a macro that copies and pastes data and pastes 2 rows under the previous one.
    By thebank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2012, 05:02 PM
  6. Replies: 0
    Last Post: 07-27-2011, 09:48 PM
  7. [SOLVED] Macro which inserts a column and cut and pastes data
    By s b via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2005, 01:05 PM

Tags for this Thread

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