![]() |
Range Select Macro
I recorded the macro below. I need a macro that will copy a group of cells. I select the firs cell, say A11, and the macro takes over, selecting A11:N11 and copyin the selection to A2 on Sheet3. The problem with the macro is, it always selects A11:N11. I need it t start where I choose, say, A17, then it selects A17:N17 Range("A11:N11").Select Selection.Copy Sheets("Macro").Select Range("A2").Select ActiveSheet.Paste Application.CutCopyMode = False Sheets("Form").Select End Sub Thanks in advanc -- Archi ----------------------------------------------------------------------- Archie's Profile: http://www.excelforum.com/member.php...fo&userid=3084 View this thread: http://www.excelforum.com/showthread.php?threadid=50504 |
Range Select Macro
Range(ActiveCell, ActiveCell.Offset(0, 13)).Select
should do the trick Greetings from New Zealand Bill K "Archie" wrote in message ... I recorded the macro below. I need a macro that will copy a group of cells. I select the first cell, say A11, and the macro takes over, selecting A11:N11 and copying the selection to A2 on Sheet3. The problem with the macro is, it always selects A11:N11. I need it to start where I choose, say, A17, then it selects A17:N17 Range("A11:N11").Select Selection.Copy Sheets("Macro").Select Range("A2").Select ActiveSheet.Paste Application.CutCopyMode = False Sheets("Form").Select End Sub Thanks in advance -- Archie ------------------------------------------------------------------------ Archie's Profile: http://www.excelforum.com/member.php...o&userid=30840 View this thread: http://www.excelforum.com/showthread...hreadid=505046 |
Range Select Macro
if you have a cell in column A selected:
If selection.cells.count=1 and selection.cells(1).column=1 then Selection.Resize(1,14).Copy Destination:=Sheets("Macro").Range("A2") Application.CutCopyMode = False Sheets("Form").Select 'don't need this if starting on Form else msgbox "To copy a row, select a single cell in column A" end if (untested) Tim -- Tim Williams Palo Alto, CA "Archie" wrote in message ... I recorded the macro below. I need a macro that will copy a group of cells. I select the first cell, say A11, and the macro takes over, selecting A11:N11 and copying the selection to A2 on Sheet3. The problem with the macro is, it always selects A11:N11. I need it to start where I choose, say, A17, then it selects A17:N17 Range("A11:N11").Select Selection.Copy Sheets("Macro").Select Range("A2").Select ActiveSheet.Paste Application.CutCopyMode = False Sheets("Form").Select End Sub Thanks in advance -- Archie ------------------------------------------------------------------------ Archie's Profile: http://www.excelforum.com/member.php...o&userid=30840 View this thread: http://www.excelforum.com/showthread...hreadid=505046 |
Range Select Macro
Thank you, one and all. -- Archie ------------------------------------------------------------------------ Archie's Profile: http://www.excelforum.com/member.php...o&userid=30840 View this thread: http://www.excelforum.com/showthread...hreadid=505046 |
Range Select Macro
Here is a simple little sub to do what you asked. There is no error
checking. It assumes that the selected cell in the activesheet is the range you want. If you are in column B instead of A, it would copy through column O rather than column N. You should probably add at least the check if not myrange is nothing then before proceeding ... Sub myRangeSelect() Dim myRange As Range Set myRange = Selection myRange.Resize(, 14).Copy Sheets("Macro").Range("a2") Application.CutCopyMode = False End Sub -- Kevin Vaughn "Archie" wrote: I recorded the macro below. I need a macro that will copy a group of cells. I select the first cell, say A11, and the macro takes over, selecting A11:N11 and copying the selection to A2 on Sheet3. The problem with the macro is, it always selects A11:N11. I need it to start where I choose, say, A17, then it selects A17:N17 Range("A11:N11").Select Selection.Copy Sheets("Macro").Select Range("A2").Select ActiveSheet.Paste Application.CutCopyMode = False Sheets("Form").Select End Sub Thanks in advance -- Archie ------------------------------------------------------------------------ Archie's Profile: http://www.excelforum.com/member.php...o&userid=30840 View this thread: http://www.excelforum.com/showthread...hreadid=505046 |
All times are GMT +1. The time now is 02:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com