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: 58
Default Using alphanumeric and numeric criteria in same code

I was given the following code and it works but I need to also add criteria
that is numeric only. When I add numeric only criteria it does not work.
Thoughts??

Sub DeleteRows()
Dim kpxRow As Long
Dim kpxTemp As Long
Const Criteria As String = "Y08,Y09"
With ActiveSheet
kpxRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For kpxTemp = kpxRow To 1 Step -1
If InStr("," & Criteria & ",", "," & Left(.Cells(kpxTemp, _
"E").Value, 3) & ",") Then .Rows(kpxTemp).Delete
Next
End With
End Sub
 
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
Alphanumeric Sorting - numeric alpha numeric Mike Excel Worksheet Functions 2 September 15th 08 10:12 PM
VLOOKUP with numeric and alphanumeric values Dan Excel Discussion (Misc queries) 6 November 2nd 07 04:59 PM
Converting Alphanumeric numbers to Numeric Lowkey Excel Worksheet Functions 3 May 8th 06 11:24 PM
How to change alphanumeric to numeric borg Excel Programming 3 April 12th 06 11:54 PM
VBA - Looking to strip alphanumeric from numeric Dingo[_2_] Excel Programming 2 January 30th 04 06:52 PM


All times are GMT +1. The time now is 09:43 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"