473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Copy Range below another one

Hi, I am trying to copy a range below another one......

I have defined two ranges as follow:

Dim r1 As Range
Dim r2 As Range
Set r1 = Sheets("Old Index").Range("A9:A200, H9:H200, K9:K200")
Set r2 = Sheets("New Index").Range("A9:A200, H9:H200, K9:K200")

I first copy the first range into another sheet by doing this:

r1.Copy Sheets("Trades").Range("A5")

now I want to copy the r2 range but it should use as the first cell, the one below the last one used by r1.......

How can I do this? Any help will be greatly appreciated!
thanks,
Fer
Nov 5 '07 #1
0 1026

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: sam | last post by:
Hi, The following code produced a core-dump: PropertyParser::PropertyParser(list<HashMap> &p_list) { l_conf_data.clear(); cout << "beginning copy.. size: " << p_list.size() << endl;...
2
by: Mansi | last post by:
I'm trying to automate excel from c#. One of the things I need to do is to copy/paste/insert rows in excel via c# code. I tried to do the following: 1) Select a row in excel (a12 to k12) 2)...
4
by: IMS.Rushikesh | last post by:
Hi All, I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null)
1
by: Jeffrey Bradshaw | last post by:
Is there any way to make a copy of a word.range object? I have a range in a document and I need to monkey around with it but I don't want to change the original in the document. I've tried...
1
by: Robert Bravery | last post by:
HI all, I have opened exce through interop, I have selected the correct sheet, and also selected the correct range. How do I now copy the selected range to the clipboard and then put the contents...
4
by: pedagani | last post by:
I want to copy only a part of the binary file delimited by offset values say START_OFFSET_ & END_OFFSET_ which can be as huge as a 50 Giga. Below is the program where I could set a START_OFFSET_...
2
by: Alan T | last post by:
I have two bookmarks, eg. beginMark and endMark I need to get the text between these 2 bookmarks, how do I do that? eg. <beginMark> Hello Word! This is Saturday.
4
by: JDVOIGT | last post by:
I am building a P&L on worksheet(1) based on data from worksheet(2). I need to copy rows of data from worksheet(2) and paste onto worksheet(1). The pasting process needs to find a named range (one...
4
by: omono84 | last post by:
I know that this should be rather simple but i seem to be missing a step to get it to work. and have been unable to find a solution on the net. The aim is that I click on the open button to find...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.