Cells.find help

  • Thread starter erikkeith via OfficeKB.com
  • Start date
E

erikkeith via OfficeKB.com

I am trying to do this. Once I run this command:

Cells.Find(What:="Average Totals", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

It will activate whatever cell it finds "Average Totals" in. Once this
happens I want the macro to take that row and make it active so I can insert
a row. How can I do it?
 
A

Ardus Petus

Cells.Find(What:="Average Totals", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).EntireRow.Activate

HTH
 
I

Ivan Raiminius

Hi,

does this help?

Cells.Find(What:="Average Totals", After:=ActiveCell,
LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).entirerow.insert
shift:=xlshiftdown

Regards,
Ivan
 
E

erikkeith via OfficeKB.com

Perfect! Thanks

Ivan said:
Hi,

does this help?

Cells.Find(What:="Average Totals", After:=ActiveCell,
LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).entirerow.insert
shift:=xlshiftdown

Regards,
Ivan
 

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

Top