Solved Add Row to Different Sheet & Auto Input Info

March 2, 2016 at 10:31:15
Specs: Windows 7
I am looking for a code to do the following:

If date value is inputted in Sheet LOI Column C Row 5 then a row should be added to Sheet 1 Row 23 and populates the following info "Pre-Construction Meeting: Sheet LOI C5 Date Value".

Is this possible?


See More: Add Row to Different Sheet & Auto Input Info

Report •


#1
March 2, 2016 at 16:29:50
✔ Best Answer
re: "then a row should be added to Sheet 1 Row 23"

I don't know what you mean by "a row should be added to Row 23". You can't add a Row to Row.

Do you mean that you want to add a Row below Row 23?

re: "populates the following info "Pre-Construction Meeting: "

Populates the info where?

Assuming that you mean that you want to add a Row below Row 23 and that you want to populate the new A24 with the info, then try this code:

Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Address = "$C$5" Then
    If IsDate(Target) Then
      Sheets("Sheet1").Cells(23, 1).Insert
      Sheets("Sheet1").Cells(24, 1) = _
              "Pre-Construction Meeting: " & Target.Value
   End If
  End If
End Sub

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
March 3, 2016 at 09:42:26
Thanks so much!

It worked perfect... Just had to change the sheet name (it was just "1") and add another insert line to make the formatting look right. I really appreciate your help!


Report •

#3
Report •

Related Solutions


Ask Question