Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have to delete a series of rows within several spreadsheets. I am trying
to write code for a macro that will search for wordage within a cell (Edit - Search), and once the search engine finds that cell, I will delete all rows directly above that cell (not including the first two rows). The issue I am having is that the wordage that is the result of the search is not always in the same row; i.e. sometimes it is in row 43, sometimes 44, etc. Is there a way within a macro to declare that I want all rows deleted above a specified row, not including the first two rows? This is the code I have thus far: Cells.Find(What:="EQUIPMENT", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("44:44").Select Range(Selection, Selection.End(xlUp)).Select Rows("4:44").Select Range("A44").Activate Selection.Delete Shift:=xlUp Thank you, THEFALLGUY |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You might want to post this in a newsgroup that deals with Excel, instead of
this one which deals withe Access Database application. -- Ted |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
My abject apologies! I thought I was in an Access newsgroup when I posted
this. Of course this is the correct newsgroup. -- Ted "TedMi" wrote: You might want to post this in a newsgroup that deals with Excel, instead of this one which deals withe Access Database application. -- Ted |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
?B?VGVkTWk=?= wrote
You might want to post this in a newsgroup that deals with Excel, instead of this one which deals withe Access Database application. Huh??? This IS an Excel newsgroup. -- David |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Fall Guy,
Did you find out how to solve this problem? I need to do the same thing. Can you share your solution with me please? Thanks, Scott "THEFALLGUY" wrote: I have to delete a series of rows within several spreadsheets. I am trying to write code for a macro that will search for wordage within a cell (Edit - Search), and once the search engine finds that cell, I will delete all rows directly above that cell (not including the first two rows). The issue I am having is that the wordage that is the result of the search is not always in the same row; i.e. sometimes it is in row 43, sometimes 44, etc. Is there a way within a macro to declare that I want all rows deleted above a specified row, not including the first two rows? This is the code I have thus far: Cells.Find(What:="EQUIPMENT", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("44:44").Select Range(Selection, Selection.End(xlUp)).Select Rows("4:44").Select Range("A44").Activate Selection.Delete Shift:=xlUp Thank you, THEFALLGUY |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Rows in MS Excel | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
Can Excel "slide up" rows with content thru empty rows to condense | Excel Worksheet Functions | |||
Insert rows | Excel Worksheet Functions | |||
inset rows and copy formatting , excel macro | Excel Discussion (Misc queries) |