Code Question?

Todd_M

Board Regular
Joined
Feb 24, 2002
Messages
117
Hi-


Worksheets("sheet3").Range("a1:h1") = ActiveCell([1, 8] to [1, 15])


How would you take info from from cells on sheet1.activecell.offset(1 ,8) plus each of the next 7 cells to the right (.offset(1, 15)) and paste it on sheet3.range("a1:h1")?




In addition, if range (a1:h1") on sheet3 has info in it's cells, then the next pasting of cells from sheet1 has to go to the next available row, where there is blank cells.

[a1].End(xlDown).Offset(1, 0).Select

Im assuming this statement has to be added into the code, however im not sure where?
Thanks-
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

How about the following?

'---------------
Sub test()
Dim lastrow As Long, rng As Range

lastrow = Sheets("Sheet3").Cells(Rows.Count, 1).End(xlUp).Row
With ActiveSheet
Set rng = ActiveCell.Offset(0, 7).Resize(, :cool:
End With
rng.Copy Sheets("Sheet3").Cells(lastrow + 1, 1)

End Sub
'--------------------

Not sure about the location and/or sizing of the range to be copied from this part:

ActiveCell.Offset(0, 7).Resize(, :cool:

so please amend as necessary.

Bye,
Jay

EDIT: I don't know why there is a smilie in there. The smilie character should be an 8. To see exactly, either view in 'edit' or 'reply with quote' mode.
This message was edited by Jay Petrulis on 2002-04-23 12:47
 
Upvote 0

Forum statistics

Threads
1,214,416
Messages
6,119,386
Members
448,891
Latest member
tpierce

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