+ Reply to Thread
Results 1 to 4 of 4

VBA Copy + Paste Values down a column

  1. #1
    Registered User
    Join Date
    09-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    16

    VBA Copy + Paste Values down a column

    Hi,

    I'm a super novice with this stuff, but looking to get a macro with basic copy+paste functionality.

    In the attached sheet I want to start in cell A1 and then as it works down the column:

    - If a cell is not blank, copy that cell and paste it in all below blank cells until the next non-blank cell
    - Repeat
    - End if say the number of blank cells below the last copied cell is > 50

    Thank you so much in advance!!
    Attached Files Attached Files
    Last edited by geoffffffff; 12-23-2015 at 08:10 AM.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,876

    Re: EASY Macro help

    End if say the number of blank cells below the last copied cell is > 50
    I doubt if that condition will ever be true..

    Coz the code will always check the last entry, and copy the value, and hence will never be a gap of 50 blanks

    This can be done using Basic Excel, do you not want that? Do you strictly want a VBA solution?

    Try this -

    Select A2:A30

    F5 > Alt+S > K > Enter

    = > up Arrow

    Ctrl+Enter
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    09-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: EASY Macro help

    I guess a better way to say what I meant for that last bullet is: End if the copies of the same value repeat for more than 50 cells (50 is an arbitrary figure I have come up with which is suitable)

    However, I was not aware of the non-VBA steps you have suggested and I think I'll just do that! - thanks!!

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,636

    Re: EASY Macro help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

+ 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. Easy Macro/VBA
    By lorber123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2015, 12:33 PM
  2. Easy Macro
    By lotr gollum in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2009, 03:39 PM
  3. [SOLVED] macro for graphing - should be very easy...
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2006, 11:20 AM
  4. Easy Macro
    By joelbeveridge in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2006, 12:55 AM
  5. easy macro problem
    By theintern in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2006, 02:55 PM
  6. easy macro?
    By Ctech in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-19-2006, 09:43 PM
  7. Ref error after macro - should be easy
    By gradientS in forum Excel General
    Replies: 1
    Last Post: 02-24-2005, 02:36 PM

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