ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cells.find help (https://www.excelbanter.com/excel-programming/360657-cells-find-help.html)

erikkeith via OfficeKB.com

Cells.find help
 
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?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1

Ardus Petus

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

HTH
--
AP

"erikkeith via OfficeKB.com" <u13156@uwe a écrit dans le message de news:
5fca0f6998692@uwe...
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?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1




Ivan Raiminius

Cells.find help
 
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


erikkeith via OfficeKB.com

Cells.find help
 
Perfect! Thanks

Ivan Raiminius wrote:
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


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com