+ Reply to Thread
Results 1 to 2 of 2

Copy/Paste if cell below is empty

  1. #1
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    14

    Copy/Paste if cell below is empty

    Hey everyone,

    I am trying to do what I thought was a simple macro, however, not much luck currently, will post my current (although not functioned) code at the end of the day when I get to my home computer.

    Heres what I want to do:
    I want to copy the active cell to the cell below it, only if the cell is empty. Then go to the newly copied cell and repeat the loop. If the cell below activecell is not empty, I want to go to that cell and start the process again.

    For example:

    CARS COST
    BMW $1,000.00
    (BLANK) $1,000.00
    MERC $2,500.00
    (BLANK) $2,500.00
    (BLANK) $2,500.00
    HONDA $1,500.00
    (BLANK) $1,500.00
    (BLANK) $1,500.00
    TOYOTA $200.00
    FORD $150.00
    (BLANK) $150.00
    (BLANK) $150.00

    I would want to look like:
    CARS COST
    BMW $1,000.00
    BMW $1,000.00
    MERC $2,500.00
    MERC $2,500.00
    MERC $2,500.00
    HONDA $1,500.00
    HONDA $1,500.00
    HONDA $1,500.00
    TOYOTA $200.00
    FORD $150.00
    FORD $150.00
    FORD $150.00

    I can run a very easy macro to just copy and paste cells down, but when there is no blank between two different labels (i.e. between Toyota and Ford) I get stuck.

    HELPPP MEEEE.

    Anyway, figured I'd see if anyway had an easy solution because it seemed very easy in my head.
    Last edited by poptcorn; 06-30-2011 at 09:33 AM. Reason: formatting

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Copy/Paste if cell below is empty

    let be value $ in column B and car name in column A
    use this code
    Please Login or Register  to view this content.
    and it should be done

    Best Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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