+ Reply to Thread
Results 1 to 2 of 2

Copy and paste range that contains data & copy and paste, if cell contains data

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Copy and paste range that contains data & copy and paste, if cell contains data

    Please Login or Register  to view this content.
    So far this code does what I need it to. What I additionally need it to do is copy and paste Calculator Range X2:AB2 and all cells below that contain data. However, column AB contains formulas that may or may not display a result, Im not sure if this matters for VBA language. I also need it pasted with all borders around it.

    In addition I need it to look at AD10, see if there is text in the cell and copy and paste it along with the cell to the left. In formula language it would look like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    . I need it to do more, but once I see what the code looks I should be able to copy it and change cell references.

    Thank you kindly.
    Attached Files Attached Files
    Last edited by Butcher1; 11-28-2020 at 11:21 PM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Copy and paste range that contains data & copy and paste, if cell contains data

    you can't use the enum called xlUP to copy select cells. all that does is find stopping points. and those stopping points are blank ranges (cells). furthermore, you can't paste data from one range to another naturally without using the xlPasteType enum to spec what you want copied:

    https://docs.microsoft.com/en-us/off...el.xlpastetype

    per this:

    https://docs.microsoft.com/en-us/off...e.pastespecial

    the pros here might know formulas that can help with this, but all I see is range looping.

+ 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. Copy Paste data from cell range to another
    By mridul127 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-28-2019, 07:44 AM
  2. [SOLVED] copy range and paste next to each cell with data
    By maym in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-10-2016, 02:13 AM
  3. [SOLVED] Copy/paste data using checkbox-clear when unchckd & multiple selections paste in next cell
    By Staceymcw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-02-2015, 12:09 AM
  4. [SOLVED] Macro to copy and paste new data into the next blank cell WITHIN a range
    By MattRNR in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 10-22-2015, 12:45 AM
  5. Replies: 1
    Last Post: 01-16-2013, 05:36 AM
  6. Copy/Paste range of data excluding certain rows and copy to another workbook
    By HoerbigAdm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2012, 02:51 PM
  7. How to copy/paste range only if data in ANY cell of that range
    By bridie4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2011, 08:13 AM

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