insert and copy cells

beeedit

New Member
Joined
Mar 28, 2002
Messages
3
Looking for some assistance...please

Here's my sheet

employee# Name Dept Hour1 Hour2...Hour3
12356 Jeff 123 8 4 6
333 Tammy 453 8 0 2
...

What I want this to look like is:

employee# Name Dept Hour1 Hour2...Hour10
12356 Jeff 123 8
12356 Jeff 123 4
12356 Jeff 123 6
333 Tammy 453 8
333 Tammy 453 2

Basically I am inserting a blank row every time Hours2...Hours10 has a value, I then want to copy employee#,Name, Dept into the blank row with each occurence of hours2...hours10

Here is what I have, I am having trouble witht range, copy, paste

Sheets("totals").Select

counter = 2
Do While Not EndofFile

Set curcell = Worksheets("totals").Cells(counter, 10)

If curcell<> "" Then
counter = counter + 1
Set curcell = Worksheets("totals").Cells(counter, 10)
curcell.EntireRow.Insert
strRange = "A" + counter + ":" + "F" + counter
Range("strRange").Select

Selection.Copy
Range(curcell).Select
ActiveSheet.Paste
End If
counter = counter + 1
Loop

thanks
This message was edited by beeedit on 2002-03-30 10:29
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,213,535
Messages
6,114,192
Members
448,554
Latest member
Gleisner2

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