+ Reply to Thread
Results 1 to 4 of 4

Loop: IF cell is not blank then output adjacent cell

  1. #1
    Registered User
    Join Date
    03-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    84

    Loop: IF cell is not blank then output adjacent cell

    I'm a VBA newbie so i'm cobbling together pieces of code I've picked up online. I have the below which i think is close but rather than 'my text' i would like to repeat whatever is in the adjacent cell in column A. However, if there is already a value present in cell B, then don't do anything.

    Please Login or Register  to view this content.
    Help most appreciated.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Loop: IF cell is not blank then output adjacent cell

    If cell.Offset(0, 1).Value = "" Then cell.Offset(0, 1).Value = Cell.Value
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Loop: IF cell is not blank then output adjacent cell

    Never got back to you AlphaFrog. Apologies. This is perfect - Thank you.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Loop: IF cell is not blank then output adjacent cell

    You're welcome. Thanks for the feedback.

+ 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. Copying data from adjacent cell to blank cell (left side)
    By raghunaik in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2015, 08:20 AM
  2. [SOLVED] Have a Linked picture in a cell, need to clear it if the adjacent cell is blank
    By sucosam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-02-2014, 10:19 AM
  3. Replies: 4
    Last Post: 05-15-2014, 09:32 AM
  4. Need loop to copy value on a column until cell adjacent to it is blank.
    By boonboonzzz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-10-2014, 02:04 AM
  5. [SOLVED] Need hyperlink in cell qnly if adjacent cell to left is blank...
    By egildone in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2012, 03:52 PM
  6. User form to display adjacent cell value and move to next blank cell
    By Ketel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-21-2008, 03:15 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