Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy Specific Cells depending upon cursor location in Excel

I want to copy specific cells within one row to another location. I am
creating a Macro to do this, but my problem is How to tell the macro which
row to use. It will Always be the Active row but will change. I am not very
good with macros yet. I am selecting the same cells (columns 6-11) each
time and I am copying the info into Column X as X1, X2, X3.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Copy Specific Cells depending upon cursor location in Excel

The active row can be identified as the selection criteria by reference to
the ActiveCell, so

ActiveCell.Row is the number of the row that is active, (BTW
ActiveCell.Column is the column number)

So to select a specific value from the active row use

Cell(ActiveCell.Row,1) ' for column 1 etc

If you wish to copy the range of cells 6 to 11 to X1 - try something
like.....

Range(Cells(ActiveCell.Row, 6), Cells(ActiveCell.Row, 11)).Copy
Destination:=Range("X1")






--
Cheers
Nigel



"REVA" wrote in message
...
I want to copy specific cells within one row to another location. I am
creating a Macro to do this, but my problem is How to tell the macro which
row to use. It will Always be the Active row but will change. I am not

very
good with macros yet. I am selecting the same cells (columns 6-11) each
time and I am copying the info into Column X as X1, X2, X3.



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
what criteria needed to copy non blank cells to another location? jill.mullen Excel Worksheet Functions 0 March 11th 08 10:31 AM
Vlookup file location changes depending on value within cell vane0326 Excel Worksheet Functions 0 June 25th 06 03:23 AM
From Macro in Excel find cursor location eg.C7 kt(uk) Excel Discussion (Misc queries) 1 May 10th 06 03:03 PM
how do I hyperlink excel to a specific location in a PDF? shakes Excel Discussion (Misc queries) 0 October 3rd 05 05:59 PM
copy result to a specific location Newbie Excel Programming 2 January 26th 04 02:19 PM


All times are GMT +1. The time now is 03:12 PM.

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

About Us

"It's about Microsoft Excel"