I have a case select that I use in another spreadsheet. I am trying to edit it to work for my current one. What I need to do is add an & statement. Meaning if C2 Case Is < 46.1 & D2 Case Is < 6 arrStore(StoreIndex) = "A"
Currently this is what I have
Sub SortIntoGroups()
Dim varZip As Variant
Dim arrStore() As String
Dim StoreIndex As Long
With Range("C2", Cells(Rows.Count, "C").End(xlUp))
If .Row < 2 Then Exit Sub 'No data
ReDim arrStore(1 To .Rows.Count)
For Each varZip In .Value
StoreIndex = StoreIndex + 1
Select Case varZip
Case Is < 46.1
arrStore(StoreIndex) = "A"
Case 46 To 100
arrStore(StoreIndex) = "B"
Case Is > 100.1
arrStore(StoreIndex) = "C"
Case ""
arrStore(StoreIndex) = ""
Case Else
arrStore(StoreIndex) = "none"
End Select
Next varZip
End With
If StoreIndex > 0 Then Range("F2").Resize(StoreIndex).Value = Application.Transpose(arrStore)
End Sub
Bookmarks