Copy and paste code in VB Excel

Soldato
Joined
18 Oct 2002
Posts
3,074
Location
MK
I want to copy a range of cells from one sheet to another in the same work book.

I found out how to select a range

Application.Goto ActiveWorkbook.Sheets("Total").Range("C2:J3")

But then how do i copy it and paste it into a sheet called Index?

Thanks
 
In the end, i selected the cells and used the function "Selection.copy"

Found it out by recording the macro and looking at the code :)

Is there a method to select cells with a certain value?

i.e. select all cells in range h5 to al5 with value 1? Then total them?
 
Ok, one more excel question!

How do i do an IF statment on a range of cells?

i.e. IF(a1:a12 = "H", b2 +1)

Comes up with "#value" error :(
 
Back
Top Bottom