(Solved) – Excel VBA Code – If Then with multiple If Options

(solved)-–-excel-vba-code-–-if-then-with-multiple-if-options

I am looking for some expert advice on writing a small bit of VBA for a worksheet I’m building. I’ve tried a few different variations with no luck. I’ve pasted what I have below. Any assistance would be greatly appreciated.

If Range("C2:C900").Value = ("ME","NH","VT","MA","RI","CT") Then Range("D2:D900").Value = I

If Range("C2:C900").Value = ("NY",NJ","PR") Then Range("D2:D900").Value = II

If Range("C2:C900").Value = ("PA",MD","DE","VA","DC","WV") Then Range("D2:D900").Value = III

And so on

Leave a Reply

Your email address will not be published. Required fields are marked *