Updating (Adding Rows) To A Second Worksheet

  • Thread starter Thread starter jdcollins21
  • Start date Start date
J

jdcollins21

I've got a value (a city name) in cell a1 in Sheet2 of Book2.xls. Want
want to do is open a second workbook (Book1.xls), find the value i
the third column of sheet1 and insert a blank row after the entry.

Any help is great appreciate
 
jd,

Sub TryNow()
Dim myVal As String
Dim myCell As Range

myVal = Workbooks("Book2.xls"). _
Worksheets("Sheet2").Range("A1").Value
Workbooks.Open "C:\Excel\Book1.xls"
Worksheets("Sheet1").Activate
Set myCell = Range("C:C").Find(myVal)
myCell(2).EntireRow.Insert

End Sub

HTH,
Bernie
MS Excel MVP
 
Back
Top