Trying to Copy a Cell from New Row and Paste in New Location on another Worksheet

Status
Not open for further replies.

theteerex

Board Regular
Joined
Mar 2, 2018
Messages
102
I have 3 functions that I use to detect when a new row is added on a Sheet5, go to Sheet1 and add a copy of a predefined range to the last row on sheet1.
My problem is I then want to have a particular cell on that new row from Sheet5 to be copied to a particular cell the newly pasted Sheet1 range.

I have a function that definitely finds a cell on one sheet and pastes it on another sheet. I just need a way to have it find the cell in the newly created row and then paste it in the newly created template.
My code for copying and pasting the cell:
Sub CopyCell()


Sheet5.Select
Range("B64").Select
Selection.Copy
Sheet1.Select
Range("C1962").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False




End Sub

The rest of my code:

Sub Worksheet_Calculate()


Dim X As Range
Set X = LastCell
If Sheet5.Range("A" & Rows.Count).Value < X.Value Then
X.Value = Me.Range("A" & Rows.Count).Value
AddProj
End If
End Sub

Function LastCell() As Range
With Sheet5
Set LastCell = .Cells(Rows.Count, 1).End(xlUp)
End With
End Function

Sub AddProj()


Sheet1.Range("Master").Copy Sheet1.Range("C" & Rows.Count).End(xlUp).Offset(1)


End Sub

Can I simply modify the LastCell and Worksheet_Calculate functions and place them on Sheet1?
This way I can calculate the last row prior to anything being added and then offset 1 and paste?

Any help?
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

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