Is there a more elegant way to write this vba code?
Code:
'price
Select Case Sheets("control").Range("B4").Value
Case 1: sentPrice1 = "most competitive"
Case 2:
Select Case masterWorksheet.Range("X47").Value
Case 1: sentPrice1 = "most competitive"
Case 2: sentPrice1 = "least competitive"
End Select
Select Case masterWorksheet.Range("X48").Value
Case 1: sentPrice2 = "most competitive"
Case 2: sentPrice2 = "least competitive"
End Select
Select Case masterWorksheet.Range("X49").Value
Case 1: sentPrice3 = "most competitive"
Case 2: sentPrice3 = "least competitive"
End Select
Case 3:
Select Case masterWorksheet.Range("X47").Value
Case 1: sentPrice1 = "most competitive"
Case 2: sentPrice1 = "second most competitive"
Case 3: sentPrice1 = "least competitive"
End Select
Select Case masterWorksheet.Range("X48").Value
Case 1: sentPrice2 = "most competitive"
Case 2: sentPrice2 = "second most competitive"
Case 3: sentPrice2 = "least competitive"
End Select
Select Case masterWorksheet.Range("X49").Value
Case 1: sentPrice3 = "most competitive"
Case 2: sentPrice3 = "second most competitive"
Case 3: sentPrice3 = "least competitive"
End Select
Case 4:
Select Case masterWorksheet.Range("X47").Value
Case 1: sentPrice1 = "most competitive"
Case 2: sentPrice1 = "second most competitive"
Case 3: sentPrice1 = "second least competitive"
Case 4: sentPrice1 = "least competitive"
End Select
Select Case masterWorksheet.Range("X48").Value
Case 1: sentPrice2 = "most competitive"
Case 2: sentPrice2 = "second most competitive"
Case 3: sentPrice2 = "second least competitive"
Case 4: sentPrice2 = "least competitive"
End Select
Select Case masterWorksheet.Range("X49").Value
Case 1: sentPrice3 = "most competitive"
Case 2: sentPrice3 = "second most competitive"
Case 3: sentPrice3 = "second least competitive"
Case 4: sentPrice3 = "least competitive"
End Select
Case 5:
Select Case masterWorksheet.Range("X47").Value
Case 1: sentPrice1 = "most competitive"
Case 2: sentPrice1 = "second most competitive"
Case 3: sentPrice1 = "third most competitive"
Case 4: sentPrice1 = "second least competitive"
Case 5: sentPrice1 = "least competitive"
End Select
Select Case masterWorksheet.Range("X48").Value
Case 1: sentPrice2 = "most competitive"
Case 2: sentPrice2 = "second most competitive"
Case 3: sentPrice2 = "third most competitive"
Case 4: sentPrice2 = "second least competitive"
Case 5: sentPrice2 = "least competitive"
End Select
Select Case masterWorksheet.Range("X49").Value
Case 1: sentPrice3 = "most competitive"
Case 2: sentPrice3 = "second most competitive"
Case 3: sentPrice3 = "third most competitive"
Case 4: sentPrice3 = "second least competitive"
Case 5: sentPrice3 = "least competitive"
End Select
Case Else:
End Select