Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Help: Making a copying macro from cursor position ?

How do I make a macro that is able to copy the content for the sheet 1 -
cursor position and 5 row wide: (fx. D5-D10) to sheet 2 and 5 coloms down
(fx. A10-F10) ? I am going nuts !

Jesper


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Making a copying macro from cursor position ?

Jesper,
Do you mean cursor position or ActiveCell ?
How do you know A10 is the start on sheet2?
Assuming Sheet1 is your active sheet, a cursor position or activecell have
no meaning on Sheet2.

NickHK

"-[::::Shamran::::]-" wrote in message
...
How do I make a macro that is able to copy the content for the sheet 1 -
cursor position and 5 row wide: (fx. D5-D10) to sheet 2 and 5 coloms down
(fx. A10-F10) ? I am going nuts !

Jesper




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Making a copying macro from cursor position ?


"NickHK" wrote in message
...
Jesper,
Do you mean cursor position or ActiveCell ?
How do you know A10 is the start on sheet2?
Assuming Sheet1 is your active sheet, a cursor position or activecell have
no meaning on Sheet2.


Sorry for the confusion ! I mean Activ cell and active sheet offcause ! Like
this:
On sheet 1 I have all my data:

A1 name 232 232 434 435 214
A2 name 234 23 564 635 314


What I would like to do is to auto. copy A1-Ax (activcell on name) to Sheet
2 with a buttonclick (on sheet1):

C1 name
C2 data
C3 data
C4 data
C5 data

Jesper


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Making a copying macro from cursor position ?

Jesper,
Something like:
With ActiveCell
Range(Cells(.Row, 1), Cells(.Row, .Column)).Copy
End With

Sheets("Sheet2").Range("C1").PasteSpecial Paste:=xlAll, Transpose:=True

NickHK

"-[::::Shamran::::]-" wrote in message
...

"NickHK" wrote in message
...
Jesper,
Do you mean cursor position or ActiveCell ?
How do you know A10 is the start on sheet2?
Assuming Sheet1 is your active sheet, a cursor position or activecell

have
no meaning on Sheet2.


Sorry for the confusion ! I mean Activ cell and active sheet offcause !

Like
this:
On sheet 1 I have all my data:

A1 name 232 232 434 435 214
A2 name 234 23 564 635 314


What I would like to do is to auto. copy A1-Ax (activcell on name) to

Sheet
2 with a buttonclick (on sheet1):

C1 name
C2 data
C3 data
C4 data
C5 data

Jesper




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Making a copying macro from cursor position ?


"NickHK" wrote in message
...
Jesper,
Something like:
With ActiveCell
Range(Cells(.Row, 1), Cells(.Row, .Column)).Copy
End With

Sheets("Sheet2").Range("C1").PasteSpecial Paste:=xlAll, Transpose:=True

NickHK


Thank you very much NickHK....saved my day have you ;-)

Shamran




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
cursor position MarkT Excel Discussion (Misc queries) 5 February 7th 07 01:25 PM
How do you set cursor position at current date in macro? Tom Robertson Excel Worksheet Functions 1 May 28th 06 03:50 PM
Cursor position saziz Excel Discussion (Misc queries) 2 August 9th 05 08:19 PM
Position Cursor to A1 Dennis Damsgaard Excel Programming 3 June 8th 04 10:30 PM
cursor position NTL Excel Programming 1 January 18th 04 08:23 PM


All times are GMT +1. The time now is 10:14 PM.

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"