LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Copy to

Hello,

Further to my previous post I am again stucked with a command.
With the below statement I want to copy certain lines to a different
sheet, but as I have to use this statement a couple of times.
Therefore I would like to be flexible in choosing the cell to which I
would like to copy the selected lines.

In the current statement all results are copied to column G so in case
of multiple selections the system will overwrite the date in cell G1.
Can anyone advice how to adjust this statement in order to get all
values past starting in cell G20?

Hope it makes sense;-)

Thanks very much!!

Rgds,
robert

'Subtract: RNFH, PRIVATE LOANS (i=b)
Dim bLastRow As Long, bNextRow As Long
Dim b As Long
With Worksheets("Cut-Out")
bLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For b = 1 To bLastRow
If .Cells(b, "A").Value = "RNFH" Then
bNextRow = bNextRow + 1
.Cells(b, "A").Resize(, 28).Copy _
Worksheets("BarraFormat").Cells(aNextRow, "G")
End If
Next b

End With
 
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
Copy and paste versus copy and insert copied cells Alana New Users to Excel 1 September 28th 07 08:58 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
copy formulas from a contiguous range to a safe place and copy them back later Lucas Budlong Excel Programming 2 February 22nd 06 08:26 PM
EXCEL FILE a copy/a copy/a copy ....filename ve New Users to Excel 1 September 29th 05 09:12 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM


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