+ Reply to Thread
Results 1 to 4 of 4

Copy cell and fill right and down until next highlighted cell?

  1. #1
    Registered User
    Join Date
    05-02-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    84

    Question Copy cell and fill right and down until next highlighted cell?

    I'm looking for a VBA code to copy cell "B2" and fill right and down (selected in the picture below) on a sheet change event at "A1"

    It's really bad and doesn't work but here my try:

    Please Login or Register  to view this content.
    gHTPe.png

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Copy cell and fill right and down until next highlighted cell?

    I am not clear on what range is being filled. Are you filling the select cells? Or are you filling blank cells down to the first non-blank cell in Column B and to the last filled cell in Row 1?

  3. #3
    Registered User
    Join Date
    05-02-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    84

    Re: Copy cell and fill right and down until next highlighted cell?

    I want to copy whatever the value/formula in "B2" to "B2:D5"

    First column is "B1", last column is "B2" to right until next empty cell (something like End(xlToRight)
    First row is "B2" last row is "B2" down to next highlighted cell

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    Just try [B2].Copy [B2:D5]

+ 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] Copy Row of Highlighted Cell
    By asilocyra in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-25-2017, 04:19 AM
  2. simple one: If cell highlighted, then copy value
    By hmm321 in forum Excel General
    Replies: 4
    Last Post: 10-26-2015, 02:24 AM
  3. [SOLVED] Copy entire row if cell is highlighted
    By bdrilling33 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-02-2014, 10:13 AM
  4. How to 'no-fill' empty cell that has been highlighted before?
    By airbatucampur92 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2014, 12:17 AM
  5. copy content of highlighted cell into another cell
    By springadero in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-25-2013, 08:26 PM
  6. Copy Highlighted Cell from one tab to another
    By nhunt in forum Excel General
    Replies: 3
    Last Post: 10-31-2013, 02:16 AM
  7. Is it possible to assign a key to automatically fill color in the highlighted cell(s)?
    By Moonbather in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2013, 11:58 AM

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