Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
multi tab workbook
Working with numerous sheets in one book is new for me so please excuse my
ignorance here. My question is I have this code that deletes all rows on a sheet that doesn't meet the specific criteria of the text "Assets" in column B. Now I need to enhance this code for a multi sheet Excel book. My book has 6 tabs labled Assets1, Assets2, Assets3 and so on. I only want to keep information in Assets1 with the text "GESA CC" in Column labled "OrigTbl" which is column D and the text "4-$" in Column C labled "Match". Then in Assets 2 I only want to keep rows that meet the criteria of " GESACC" in column D with the text of "GESACC Only". I have many other sheets that I will be able to code if I just see how I would code these two sheets. One other question, which is better to load all the records on each individual sheet and detete from the entire list on each page or just copy the rows I want with the above criteria from the sheet titled "All REcords". I appreciate your help. Thanks so much Sub DeleteRows() Dim LastRow As Long Dim RowNdx As Long LastRow = Cells(Rows.Count, "B").End(xlUp).Row For RowNdx = LastRow To 1 Step -1 If StrComp(Cells(RowNdx, "B"), "assets", _ vbTextCompare) < 0 Then Rows(RowNdx).Delete End If Next RowNdx End sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with multi sheet workbook | Excel Worksheet Functions | |||
Complex Multi-condition, multi-workbook count | Excel Discussion (Misc queries) | |||
Finding the top two in a multi page workbook | Excel Programming | |||
multi workbook cell referencing | Excel Programming | |||
multi-file open to one workbook | Excel Programming |