+ Reply to Thread
Results 1 to 5 of 5

Need loop to copy value on a column until cell adjacent to it is blank.

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    3

    Need loop to copy value on a column until cell adjacent to it is blank.

    Hi guys,

    I'm new to this forum and am not really sure how should I start asking for help. Basically what I need is a macro that copies the value of the cell on top of a blank cell to the blank cell, provided that the cell two columns left of it is not blank.

    This excel sheet is an example of what I'm trying to achieve:

    Example.xlsx

    Cheers and thanks all!

    THB

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Need loop to copy value on a column until cell adjacent to it is blank.

    Try like this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need loop to copy value on a column until cell adjacent to it is blank.

    Wow this works almost perfectly!

    The only problem is I'm copying formulas for cell C. What would be the correct command for that?

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Need loop to copy value on a column until cell adjacent to it is blank.

    Quote Originally Posted by boonboonzzz View Post
    The only problem is I'm copying formulas for cell C
    Sorry, I am unable to understand about which one you are talking about

  5. #5
    Registered User
    Join Date
    03-09-2014
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need loop to copy value on a column until cell adjacent to it is blank.

    Oh, which means right now the macro is only working for copying over values, but not formulas. How can I modify it to copy formula instead of just value?

    Thanks so much

+ 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. [SOLVED] I need a macro to copy down till adjacent column ends in a blank cell
    By Paul Hayward in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2014, 02:27 PM
  2. [SOLVED] Excel VB-Copy formula down until adjacent cell (left) is blank?
    By Tony P. in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-04-2013, 09:43 PM
  3. [SOLVED] Do Loop with If End If statement crashing- looping through column to copy adjacent cell
    By Auwal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2012, 02:33 PM
  4. macro to find first blank cell in a column cut the value from left adjacent column
    By willykin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2012, 09:23 AM
  5. [SOLVED] loop macros until reach blank in adjacent column
    By McKCollins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2006, 06:10 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