LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Formula Not Working Properly

J_Knowles,

Thanks so much for your help. It worked just as needed.

Pam

"J_Knowles" wrote:

Here is the part about "*09" and "*10". This will delete rows with *09 or
*10 dates.

Sub DeleteRows()
With ActiveSheet
Firstrow = .UsedRange.Cells(1).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
End With
For Lrow = Lastrow To Firstrow Step -1
If Not IsError(Cells(Lrow, 1).Value) Then
If Cells(Lrow, 1).Value Like "*10" Or _
Cells(Lrow, 1).Value Like "*09" Then
ActiveSheet.Cells(Lrow, 1).EntireRow.Delete
End If
End If
Next Lrow
End Sub

HTH,
--
Data Hog


"PHisaw" wrote:


Also, using part of Ron deBruin's code for deleting rows based on data in
cells, how can I search for two entries ("*09" and "*10") without having to
copy all the code again for second search?


Firstrow = .UsedRange.Cells(1).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row

For Lrow = Lastrow To Firstrow Step -1

With .Cells(Lrow, "A")

If Not IsError(.Value) Then

If .Value Like "*10" Then .EntireRow.Delete

End If

End With

Next Lrow


I really appreciate your time and help.
Thanks again,
Pam


 
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
Formula and worksheet will not working properly nathanv3223[_3_] Excel Worksheet Functions 7 June 11th 09 07:00 AM
formula not working properly nathanv3223 Excel Worksheet Functions 2 March 5th 09 02:16 PM
Yes No box no working properly Miree Excel Programming 2 October 15th 08 08:14 AM
DirectDependents not working properly. [email protected] Excel Programming 1 February 3rd 08 03:39 AM
But not working properly Rao Ratan Singh Excel Discussion (Misc queries) 2 September 14th 06 08:45 AM


All times are GMT +1. The time now is 02:22 PM.

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"