Inserting columns in sheet1 & sheet2 into different places in sheet3

notanexcelperson

New Member
Joined
Aug 24, 2011
Messages
2
I know what I am trying to do should not be so complicated but I am having trouble finding out how to do it online.

This is what I think I need to do:
1) to take columns A, B, and C from sheet 1 and insert them into columns A, D, and G in sheet 3.
2) take columns A, B, and C in sheet 2 and insert them into B, E, and H in sheet 3.

Here is what I am working with: I have in sheet1 current deaths for each age group, for different counties due to a disease. In sheet 2 I have the population for each age group for different counties.
Columns: age groups
Rows: counties

In sheet 3 I want for each age group a column with the "deaths", a column with"population", and a column with "deaths/population".

I can just cut and past each value I need and drag down each column, but there is a lot of sheets that I need to do this for. Does anyone know if there are short cuts to doing this in excel?
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I know what I am trying to do should not be so complicated but I am having trouble finding out how to do it online.

This is what I think I need to do:
1) to take columns A, B, and C from sheet 1 and insert them into columns A, D, and G in sheet 3.
2) take columns A, B, and C in sheet 2 and insert them into B, E, and H in sheet 3.

Here is what I am working with: I have in sheet1 current deaths for each age group, for different counties due to a disease. In sheet 2 I have the population for each age group for different counties.
Columns: age groups
Rows: counties

In sheet 3 I want for each age group a column with the "deaths", a column with"population", and a column with "deaths/population".

I can just cut and past each value I need and drag down each column, but there is a lot of sheets that I need to do this for. Does anyone know if there are short cuts to doing this in excel?

Maybe: Try on a copy first.

Code:
Sub notanexcelperson()

Sheets("Sheet1").Range("A1:A" & Rows.Count).Cut Sheets("Sheet3").Range("A" & Rows.Count).End(3)(2)
Sheets("Sheet1").Range("B1:B" & Rows.Count).Cut Sheets("Sheet3").Range("D" & Rows.Count).End(3)(2)
Sheets("Sheet1").Range("C1:C" & Rows.Count).Cut Sheets("Sheet3").Range("G" & Rows.Count).End(3)(2)
Sheets("Sheet2").Range("A1:A" & Rows.Count).Cut Sheets("Sheet3").Range("B" & Rows.Count).End(3)(2)
Sheets("Sheet2").Range("B1:B" & Rows.Count).Cut Sheets("Sheet3").Range("E" & Rows.Count).End(3)(2)
Sheets("Sheet2").Range("C1:C" & Rows.Count).Cut Sheets("Sheet3").Range("H" & Rows.Count).End(3)(2)

End Sub
 
Upvote 0
Hi John,

Thanks for your reply. I should tell you that I am not an excel expert and therefore I'm not sure how to change what you sent me to actually fit my worksheets.

Do you mind explaining how to use the code you just sent. What does count mean here?
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,472
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top