Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel
|
|||
|
|||
![]()
I'm in the process of learning VBA and am having some troubles writing
an excel macro to find all instances of a word (usually in conjunction with other words) and delete the row containing it essentially I'd like row 5 below to do the following: If Cell contains word *foo* OR *baz* then such that it would find individual instances of foo and baz but also foobar Although overall a rather large macro, the code surrounding 1 Cells.Sort Key1:=Range("C1") 2 3 totalrows = ActiveSheet.UsedRange.Rows.Count 4 For Row = totalrows To 2 Step -1 5 IF CELLS(ROW, 3).VALUE = **FOO** OR CELL(ROW, 3).VALUE= **BAZ** Then 6 Rows(Row).Delete 7 End If 8 Next Row Thanks! --Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I my find pass word in excel | Setting up and Configuration of Excel | |||
find instances & report neighboring values | Excel Discussion (Misc queries) | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) | |||
Macro - Open Word with Excel macro | Excel Discussion (Misc queries) | |||
Find all text instances in a sheet and add one number from each row | Excel Discussion (Misc queries) |