Move row then add a date

GWHarvey

New Member
Joined
Feb 6, 2019
Messages
6
I have a spreadsheet to track all of our projects so any new projects get entered in the "NewProject" sheet and from there when a particular letter is entered in column 12 then that row is moved (copied and deleted). This all works great.

My question is how can I add a date to another column, say column 13 (M). The problem is it puts the date on the last blank line which might not be the correct line. As shown in yellow

Newproject sheet:
Project
Phase
Sub
Client
Type
Description
PM
Priority
Rec'ed Date
Deadline Date
Days Left
Start
000-00000-001
000
00
Sample
Sketch
GWH
Rush
02/06/19
02/10/19
4

<tbody>
</tbody>

Precalc Sheet:
Project
Phase
Sub
Client
Type
Description
PM
Priority
Rec'ed Date
Deadline Date
Days Left
Start
Precalc Rec'ed Date
111-11111-111
000
00
Sample
Siteplan
GWH
Rush
02/06/19
02/10/19
4
02/06/19
000-00000-01
000
00
Sample
Sketch
GWH
Rush
02/06/19
02/10/19
4
C

<tbody>
</tbody>

Code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns(12)) Is Nothing Then
If UCase(Target.Value) = "C" Then
Range("A" & Target.Row).Resize(1, 12).Copy Sheets("Precalc").Cells(Rows.Count, 1).End(xlUp)(2)
Target.EntireRow.Delete
Sheets("Precalc").Cells(Rows.Count, 13).End(xlUp)(2) = Date

ElseIf UCase(Target.Value) = "F" Then
Range("A" & Target.Row).Resize(1, 12).Copy Sheets("Field").Cells(Rows.Count, 1).End(xlUp)(2)
Target.EntireRow.Delete

End If
End If
End Sub


I am not sure what to use instead of the xlup.

Thanks for any help
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi & welcome to MrExcel.
try
Code:
Sheets("Precalc").Cells(Rows.Count, 12).End(xlUp).Offset(, 1) = Date
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

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