For example, I have this string that reads "IRS150Sup2500Vup"
. It could also be "IRS250Sdown1250Vdown"
.
I am looking to extract the number between the two S. Hence for the first case, it will be 150 and second case, it is 250. The numbers are not always 3 digits. It could vary.
What I have tried:
Dim pos As Integer
Dim pos1 As Integer
pos = InStr("IRS150Sup2500Vup", "S")
pos1 = InStrRev("IRS250Sdown1250Vdown","S")
After this, I am stuck how to get the number out.
Need some guidance on how to do this.