Related Posts
Jobs opportunities at Indium Software
Additional Posts in Excel Genius
Google Sheets vs Excel - pros? cons? differences?
What are the most typical models you all build
What's the F4 analogy in Office 365?
New to Fishbowl?
Download the Fishbowl app to
unlock all discussions on Fishbowl.
unlock all discussions on Fishbowl.
Can you give some more details of what you're trying to do or examples of the code that's erroring? A For or While Loop may be the easiest way, depending what you're trying to do.
I’m essentially trying to run a range of numbers (column T) through a FOR loop and then multiple IF statements to find out if that’s compliant or not based on the State rules. Does that help or I can elaborate further
Also if you're trying to apply different rules per state, you might have a better time using a CASE statement rather than a series of IF/ELSE blocks.
For r=2 to lastrow
Select Case Range("T" & r)
Case "CA"
Debug.Print "California stuff"
Case "CO"
Debug.Print "Colorado stuff"
...
Case Else
Debug.Print "No State"
End Select
Next r
Sounds like you need an IF Else with For, hopefully this video will at least get you on the right track! https://youtu.be/jNTJBQvWLBY
Make sure the starting point (row 1 in this example) has data and then “for mylooprange = 1 to activesheet.usedrange.rows.count”, “next mylooprange”.
Thanks Everyone!! It’s working :)