Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Can someone help with a macro doing this: From active cell copy down in actual column until no more cells with text is met. Blank cells should be ignored. That means copying should stop at the end of a cell with text no matter how many blank cells is in between. Regards, Kaj Pedersen --- Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret. http://www.avast.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() On 3-Nov-2013, Claus Busch wrote: Dim LRow As Long LRow = Cells(Rows.Count, 1).End(xlUp).Row Range(Cells(ActiveCell.Row, 1), Cells(LRow, 1)) _ .SpecialCells(xlCellTypeConstants).Offset(, 1) _ = ActiveCell -------------------------------------------------------------------------------- Hi Claus, I don't want to fill. Just send the selection (found by the macro) to the clipboard. I have tried to google a solution for this, unfortunately without luck. Do you have another suggestion? Regards, Kaj Pedersen --- Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret. http://www.avast.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Kaj,
Am Sun, 3 Nov 2013 13:11:34 +0100 schrieb Claus Busch: .SpecialCells(xlCellTypeConstants, 23).Copy if you have formulas in the column change the line above to: SpecialCells(xlCellTypeFormulas, 23).copy Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect. Exactly what I wanted.
Sometimes it is difficult from the beginning to describe the requirement :-) Thank you for helping once again. Regards, Kaj Pedersen --- Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret. http://www.avast.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Claus,
It is almost as I wanted. I also want to copy the blank cells, so I figured this out myself: Sub Test() Dim LRow As Long With ActiveSheet LRow = .Cells(Rows.Count, 1).End(xlUp).Row .Range(.Cells(ActiveCell.Row, 1), .Cells(LRow, 1)).COPY End With End Sub It works provided I select a cell in column A. If it is for use in column C, I have to first change the macro. (Digits 1 to digits 3 in the two lines of the macro). Is it possible to write a macro so that no matter what cell and column is selected, the previously specified area will be sent to the clipboard? Regards, Kaj Pedersen --- Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret. http://www.avast.com |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Kaj,
Am Sun, 3 Nov 2013 12:53:54 GMT schrieb : It works provided I select a cell in column A. If it is for use in column C, I have to first change the macro. (Digits 1 to digits 3 in the two lines of the macro). try: Sub Test() Dim LRow As Long With ActiveCell LRow = Cells(Rows.Count, .Column).End(xlUp).Row Range(Cells(.Row, .Column), Cells(LRow, .Column)).Copy End With End Sub Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run macro although blinking cursor is active in an active cell | Excel Programming | |||
Help: Macro Copy Active Cell to Range Name, loop | Excel Programming | |||
copy name from active sheet to cell - using macro or function | Excel Worksheet Functions | |||
Macro Copy Active Cell to Range Name, loop | Excel Programming | |||
Macro to copy cell data to word document based on an active row? | Excel Programming |