Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need to create a macro to copy an entire row and paste as a transposed list
on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Any specific destination on the different tab??
-- Gary''s Student - gsnu200787 "Jeremy" wrote: I need to create a macro to copy an entire row and paste as a transposed list on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Substitute "ActiveCell" for the cell reference used in the recorded macro... ActiveCell.EntireRow.Copy -- Jim Cone Portland, Oregon USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Jeremy" <jeremiah.a.reynolds @ gmail.com wrote in message I need to create a macro to copy an entire row and paste as a transposed list on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, It will alsays paste into B1 (paste special as value with transpose
checked) "Gary''s Student" wrote: Any specific destination on the different tab?? -- Gary''s Student - gsnu200787 "Jeremy" wrote: I need to create a macro to copy an entire row and paste as a transposed list on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub missive()
Set s2 = Sheets("Sheet2") ActiveCell.EntireRow.Copy s2.Range("B1").PasteSpecial Transpose:=True End Sub For test purposes, I used "Sheet2" as the name of the destination sheet. -- Gary''s Student - gsnu200787 "Jeremy" wrote: Yes, It will alsays paste into B1 (paste special as value with transpose checked) "Gary''s Student" wrote: Any specific destination on the different tab?? -- Gary''s Student - gsnu200787 "Jeremy" wrote: I need to create a macro to copy an entire row and paste as a transposed list on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What If I only need the data through Column V not the entire row?
"Gary''s Student" wrote: Sub missive() Set s2 = Sheets("Sheet2") ActiveCell.EntireRow.Copy s2.Range("B1").PasteSpecial Transpose:=True End Sub For test purposes, I used "Sheet2" as the name of the destination sheet. -- Gary''s Student - gsnu200787 "Jeremy" wrote: Yes, It will alsays paste into B1 (paste special as value with transpose checked) "Gary''s Student" wrote: Any specific destination on the different tab?? -- Gary''s Student - gsnu200787 "Jeremy" wrote: I need to create a macro to copy an entire row and paste as a transposed list on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A small change in the copy line:
Sub missive() Set s2 = Sheets("Sheet2") rw = ActiveCell.Row Range("A" & rw & ":V" & rw).Copy s2.Range("B1").PasteSpecial Transpose:=True End Sub -- Gary''s Student - gsnu200787 "Jeremy" wrote: What If I only need the data through Column V not the entire row? "Gary''s Student" wrote: Sub missive() Set s2 = Sheets("Sheet2") ActiveCell.EntireRow.Copy s2.Range("B1").PasteSpecial Transpose:=True End Sub For test purposes, I used "Sheet2" as the name of the destination sheet. -- Gary''s Student - gsnu200787 "Jeremy" wrote: Yes, It will alsays paste into B1 (paste special as value with transpose checked) "Gary''s Student" wrote: Any specific destination on the different tab?? -- Gary''s Student - gsnu200787 "Jeremy" wrote: I need to create a macro to copy an entire row and paste as a transposed list on a different tab. when recording the macro how can I make sure that in future uses it will use the curson reference as a selection point, not the absolute reference. to clarify: I want the user to be able to select A20 and have all the items in row 20 copied over. The next user may need row 32, so they will select A32 and use the macro. I know how the process to record, and it's a very easy macro, I just don't want the macro to keep selecting the same row. |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That worked perfectly. One last question for this. I am usiny the code you
provided. How can I make it end on the Sheet2 page? Righht now it leaves ends on Sheet1. |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One additional line:
Sub missive() Set s2 = Sheets("Sheet2") rw = ActiveCell.Row Range("A" & rw & ":V" & rw).Copy s2.Range("B1").PasteSpecial Transpose:=True s2.Activate End Sub -- Gary''s Student - gsnu200787 "Jeremy" wrote: That worked perfectly. One last question for this. I am usiny the code you provided. How can I make it end on the Sheet2 page? Righht now it leaves ends on Sheet1. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I can not stop the cursor from selecting cells | Excel Discussion (Misc queries) | |||
Help for Macro: Finding last cell and selecting it | Excel Discussion (Misc queries) | |||
Disable cursor from selecting whatever it rolls over. | Excel Discussion (Misc queries) | |||
The cursor on my Excel spreadsheet is not selecting cells. | Excel Discussion (Misc queries) | |||
Moving cursor to another cell w/out selecting entire area | Excel Discussion (Misc queries) |