LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default deleting cells: Auto filter or loop or what

I have tried to accomplish deleting certain cells based on the criteria in
Column 46 labeled as TRUE. I have tried a loop and an auto filter but I am
not getting either to work. I also tried recording a macro using the auto
filter and still no luck (the code was slightly different than the code
below). I need to get this solved as soon as possible. You folks always
come through for us...sorry to be so impatient. Included is the code for
the auto filter and the code I tried for the loop:

auto filter:
Range("AR16:AR56").AutoFilter Field:=46, Criteria1:="TRUE"
Range("A17:F56" & Rows.Count).SpecialCells(xlCellTypeVisible).Value = ""
Range("K17:M56" & Rows.Count).SpecialCells(xlCellTypeVisible).Value = ""
Range("O17:S56" & Rows.Count).SpecialCells(xlCellTypeVisible).Value = ""
Range("AR16:AR56").AutoFilter


Loop:

Dim clearrow

'Loop: Check for complete trades, delete

For X = 1 To TradesEntered.Count
Set ClosCheck = TradesEntered(X)


If ClosCheck.Value = "True" Then
With ClosCheck

clearrow = ActiveCell.Row
Range("A17" & clearrow & ":F56" & clearrow).Value = ""
Range("K17" & clearrow & ":M56" & clearrow).Value = ""
Range("O17" & clearrow & ":S56" & clearrow).Value = ""
End With

End If
Next
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto filter hidden cells Chiccada Excel Discussion (Misc queries) 1 February 19th 10 10:58 AM
Deleting cells in a loop Andyjim Excel Programming 4 January 14th 08 06:00 PM
Auto Filter and Merged Cells AlisonMP2 Excel Worksheet Functions 2 December 5th 07 12:57 AM
ranging the filter cells when doing auto filter thread Excel Programming 8 April 25th 07 11:08 PM
auto filter in merged cells plainclothman Excel Programming 1 April 18th 06 01:41 PM


All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"