I am trying to write a macro that filters a list based on criteria in a particular column and transfers the information to another sheet.
There is a problem with the line
within the overall procedure of:
Is there a better way to extract the last character of these cells and compare on a 4 case scenario?
There is a problem with the line
Code:
xmitter_type = Application.Right(Trim(Cells(j + 2, 5)), 1)
within the overall procedure of:
Code:
Dim cell As Range
Dim num_xmitters As Integer
Dim xmitter_type As String
Dim TransmitterArray(1 To 4, 1 To 200) As Range
num_xmitters = ThisWorkbook.Worksheets("Instr List").UsedRange.Rows.Count
Dim j As Integer
For j = 1 To num_xmitters
xmitter_type = Application.Right(Trim(Cells(j + 2, 5)), 1)
Select Case xmitter_type
Case "A"
ThisWorkbook.Worksheets("Instr Sort").TransmitterArray(1, j).Value = ThisWorkbook.Worksheets("Instr List").Cells(j + 2, 2).Value
Case "I"
ThisWorkbook.Worksheets("Instr Sort").TransmitterArray(2, j).Value = ThisWorkbook.Worksheets("Instr List").Cells(j + 2, 2).Value
Case "O"
ThisWorkbook.Worksheets("Instr Sort").TransmitterArray(3, j).Value = ThisWorkbook.Worksheets("Instr List").Cells(j + 2, 2).Value
Case "F"
ThisWorkbook.Worksheets("Instr Sort").TransmitterArray(4, j).Value = ThisWorkbook.Worksheets("Instr List").Cells(j + 2, 2).Value
End Select
Next j
Is there a better way to extract the last character of these cells and compare on a 4 case scenario?