Hello all, I hope all is good!
Below is a very short version of a very long 'select case' I have in one of my sheets.
-- start here --
Dim blah As Integer
Dim DataRange As Variant
Dim IcolX As Integer
Dim FcolX As Integer
Dim IpatX As Integer
Dim rnArea As Range
Dim rnCell As Range
blah = Cells(2, 9) 'Number for my last row
Set rnArea = Range("I6:AM" & blah)
For Each rnCell In rnArea
With rnCell
Select Case .Value
Case "LA", "LB", "LC", "LD"
'do this
Case "BA"
'do that
Case "CA", "CB"
'This is another
End Select
End With
Next
-- end here --
My question is this: I have another sheet (sheet2) who have 3 list: A1:A5 (LA, LB, LC, LD and LE) respectively. B1:B5 (BA, BB [...] BE) and C1:C5 (CA, CB [...] CE).
Would there be a way of using 'case "LA", "LB", "LC" link to sheet two cells A1:A5? I just find my current way to long and complex... thought??
Thanks!
E.
Below is a very short version of a very long 'select case' I have in one of my sheets.
-- start here --
Dim blah As Integer
Dim DataRange As Variant
Dim IcolX As Integer
Dim FcolX As Integer
Dim IpatX As Integer
Dim rnArea As Range
Dim rnCell As Range
blah = Cells(2, 9) 'Number for my last row
Set rnArea = Range("I6:AM" & blah)
For Each rnCell In rnArea
With rnCell
Select Case .Value
Case "LA", "LB", "LC", "LD"
'do this
Case "BA"
'do that
Case "CA", "CB"
'This is another
End Select
End With
Next
-- end here --
My question is this: I have another sheet (sheet2) who have 3 list: A1:A5 (LA, LB, LC, LD and LE) respectively. B1:B5 (BA, BB [...] BE) and C1:C5 (CA, CB [...] CE).
Would there be a way of using 'case "LA", "LB", "LC" link to sheet two cells A1:A5? I just find my current way to long and complex... thought??
Thanks!
E.