Using a range of characters in an IF then statement

I currently have a function which works:

If Row.UpRaw.Substring(14,1) = "A" then dostuffhere end IF 

I tried to get the rest of the alphabet here, but it errors out on “L” because of some length error?

So then I tried using a range like this:

If Row.UpRaw.Substring(14,1) = [A-Z] then dostuffhere end IF 

Which once again didn’t work (This one threw an error before I even tried to execute it though)

I’m sure this should be an easy solution, but I’m new to Visual Basic and need to get through this bit so I can finish the project I’m working on.

Thanks for any help!

submitted by /u/ZeroApp92
[link] [comments]

Leave a Reply