Results 1 to 5 of 5

Copy variable length column to clipboard within a macro

Threaded View

DanBlum Copy variable length column... 02-20-2009, 06:56 PM
caholmes Re: Copy variable length... 02-20-2009, 07:12 PM
DanBlum Re: Copy variable length... 02-20-2009, 09:53 PM
royUK Re: Copy variable length... 02-21-2009, 03:09 AM
DanBlum Re: Copy variable length... 02-21-2009, 09:15 AM
  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Copy variable length column to clipboard within a macro

    I have a workbook where, within a macro, I want to copy a column of contiguous non-blank entries to the clipboard. I need to do this within a macro. However, the number of entries I want to copy is variable. I can calculate how many rows I need to copy and store this on the worksheet if necessary. I have tried selecting the top row and the pressing the ctrl-downarrow shortcut key during the recording of the macro, but this only records the static position that the cursor jumps to at the time the macro is recorded. (And besides it doesn’t select all the cells in between.) Can anyone offer an approach? Can you do it with a recorded macro or is writing VBA code necessary? Sounds simple, but I’m not a VBA programmer....

    OK.. thanks for the reply....it worked (mostly), but there is a new twist...the list above is created with a formula that sometimes results in a """ and sometimes actual values. So, when I use the ctrl-shift-downarrow, it treats the "" value as a non-blank and continues on down the column (not as I intend). I have control of what null value goes into the cells to represent "blank". Is there some blank value that will stop the ctrl-shift downarrow?
    Last edited by DanBlum; 02-20-2009 at 09:46 PM.

Thread Information

Users Browsing this Thread

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

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