View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JeanPierre Charron JeanPierre Charron is offline
external usenet poster
 
Posts: 24
Default What is the proper dot.syntax to insert a select case within a With /End With Statement

For Instance,

Dim LRow As Long
Dim CostCode As String
Dim Vendor As String
With Sheets("Alpha")
LRow = Cells(Row,Count,1).End(xlUp).Row
Set CostCode = .Range("A2:A" & LRow).Value
Set Vendor = .Range("B2:B" & LRow).Value
Select Case CostCode
Case "<063" 'If CostCode is < "063" Numbers as Text
Do this
Case "304"
Do that
Case "386"
Select Case Vendor
Case "Martin"
Do This
Case "Charles"
Do That
End Select
End Select
End With
My syntax is approximative
Help appreciated,

J.P.