Insert a row above a certain cell

  • Thread starter Thread starter minrufeng
  • Start date Start date
M

minrufeng

I am working hard on this simple problem (I think it's not difficult to
implement): insert a row above a certain

cell, for example, the value of the cell is "Total Revenues" using
Macro. Does anyone of you know how to do this?

Thanks a lot for your great help!
 
Using the Macro recorder:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/20/2006 by Jim May

Cells.Find(What:="Total Revenue", After:=ActiveCell, LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.EntireRow.Insert
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top