View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TP[_3_] TP[_3_] is offline
external usenet poster
 
Posts: 5
Default Case statement in variable range

Using VBA, how would I populate one cell based on the contents of another
with a Case statement?

For example, if a1 = 555 S, b1 should = "South"
a2 = 333 N, b2 should = "North"

I cannot nest an If statement in a formula, because there are more than 7
scenarios.

**Important to note that the range will vary - is there a for i to row
count statement that can be used?

Thanks in advance!

Patti