Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default macro selecting row that cursor is on (not the same cell every tim

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default macro selecting row that cursor is on (not the same cell every tim

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default macro selecting row that cursor is on (not the same cell every tim


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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default macro selecting row that cursor is on (not the same cell every

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default macro selecting row that cursor is on (not the same cell every

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default macro selecting row that cursor is on (not the same cell every

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default macro selecting row that cursor is on (not the same cell every

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default macro selecting row that cursor is on (not the same cell every

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default macro selecting row that cursor is on (not the same cell every

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can not stop the cursor from selecting cells Excel misfit Excel Discussion (Misc queries) 3 November 30th 07 06:02 PM
Help for Macro: Finding last cell and selecting it [email protected] Excel Discussion (Misc queries) 4 January 29th 07 08:40 AM
Disable cursor from selecting whatever it rolls over. Captainupa Excel Discussion (Misc queries) 2 July 21st 06 10:09 PM
The cursor on my Excel spreadsheet is not selecting cells. auberginewellies Excel Discussion (Misc queries) 2 March 20th 06 06:36 PM
Moving cursor to another cell w/out selecting entire area Darin Excel Discussion (Misc queries) 8 May 13th 05 08:44 PM


All times are GMT +1. The time now is 09:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"