Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I'm not sure how I would code deleting any data in the cells in Column "Type"
if it is not "HO". The report I download sometimes puts odd letters in cells in this column and I just want to clear it out rather than scan this very long report and delete manually. I will put the code in an existing macro. Thank you |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
sitcfantn, here is one way
Sub Delete_HO() Dim iRow As Long Dim SpecValue As String SpecValue = "HO" If SpecValue = "" Then Exit Sub For iRow = ActiveSheet.UsedRange.Rows.Count To 1 Step -1 If Cells(iRow, 1) = SpecValue Then Rows(iRow).Delete Next iRow End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "SITCFanTN" wrote in message ... I'm not sure how I would code deleting any data in the cells in Column "Type" if it is not "HO". The report I download sometimes puts odd letters in cells in this column and I just want to clear it out rather than scan this very long report and delete manually. I will put the code in an existing macro. Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ranking query | Excel Discussion (Misc queries) | |||
Excel Macro to Copy & Paste | Excel Worksheet Functions | |||
count non blank cells which meet criteria in another column | Excel Worksheet Functions | |||
SUMPRODUCT Formula to Count Row of data Below Matched Criteria | Excel Worksheet Functions | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions |