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: 5
Default Wildcards

In my if statement I want to select only cells that start with "8" and are
six characters long.
The wild card does not work. How do I limit the cells selected to match the
criteria above?

T.I.A.



Sub PO_Test()
Dim i As Long
Dim LastRow As Long
Dim strPo As String

LastRow = Range("A2000").End(xlUp).Row

For i = LastRow To 1 Step -1
If Range("A" & i) Like "8*****" Then
strPo = Range("A" & i).Value
ElseIf Range("D" & i) Like "8*****" Then
strPo = Range("D" & i).Value
End If
Range("H" & i).Value = strPo
Next 'i

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
Wildcards and if Arlene Excel Worksheet Functions 3 June 21st 07 12:05 AM
Wildcards in RTD JKC Excel Discussion (Misc queries) 0 February 3rd 06 07:35 PM
Wildcards irresistible007 Excel Worksheet Functions 2 December 20th 05 10:12 AM
Use wildcards furia Excel Discussion (Misc queries) 0 November 16th 05 06:23 PM
Wildcards HELP ME PLEASE! Excel Programming 3 December 3rd 03 01:22 PM


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