Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Need help copying certain cells from current row

I want to be able to select contents of cells in columns B thru E in the
current row (the row where the cursor is in) and then paste that info
into cells row 2 coulmn F thru I. Then place the cursor back in the
next row after the original row.

Sounds easy, but it's not for me. Any help would be appreciated.

Jonco
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Need help copying certain cells from current row

Assuming you want to paste the data in the same row as the current row.

Sub CurrentRow() '
'I want to be able to select contents of cells in columns B thru E in the
'current row (the row where the cursor is in) and then paste that info
'into cells row 2 coulmn F thru I. Then place the cursor back in the
'next row after the original row.

Dim aWS As Worksheet
Dim myRow As Long
Dim myRange As Range

Set aWS = ActiveSheet
myRow = Selection.Row
Set myRange = aWS.Cells(myRow, 2).Resize(1, 4)
myRange.Offset(0, 4).Value = myRange.Value
aWS.Cells(myRange.Row + 1, myRange.Column).Select


End Sub

--
HTH,
Barb Reinhardt



"Jonco" wrote:

I want to be able to select contents of cells in columns B thru E in the
current row (the row where the cursor is in) and then paste that info
into cells row 2 coulmn F thru I. Then place the cursor back in the
next row after the original row.

Sounds easy, but it's not for me. Any help would be appreciated.

Jonco

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Need help copying certain cells from current row

hi
another way.
Sub copyit()
Dim r As Range
Set r = ActiveCell
Range(r, r.Offset(0, 4)).Copy Destination:=Range("F2")
r.Offset(1, 0).Select
End Sub

regards
FSt1


"Jonco" wrote:

I want to be able to select contents of cells in columns B thru E in the
current row (the row where the cursor is in) and then paste that info
into cells row 2 coulmn F thru I. Then place the cursor back in the
next row after the original row.

Sounds easy, but it's not for me. Any help would be appreciated.

Jonco

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
Advanced Filter - Copying to location other than current sheet? Maki Excel Discussion (Misc queries) 6 January 13th 10 08:10 AM
Adding to current cells Tom Excel Worksheet Functions 5 January 29th 07 01:39 AM
Ms Excel, Copying Cell to current sheet using 'Right Click' SacSuggests Excel Discussion (Misc queries) 0 June 21st 06 08:26 AM
filter gives no output, no copying necessary of current.region Leo Kurvink Excel Programming 1 March 4th 04 01:04 AM
copy current cells to the right Marisa[_2_] Excel Programming 2 October 1st 03 07:37 AM


All times are GMT +1. The time now is 04:54 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"