Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Wildcards and if | Excel Worksheet Functions | |||
Wildcards in RTD | Excel Discussion (Misc queries) | |||
Wildcards | Excel Worksheet Functions | |||
Use wildcards | Excel Discussion (Misc queries) | |||
Wildcards | Excel Programming |