Hi everybody! I'm quite a vba newbeginner, but I think this is a simple question..
I have a value in Range("I3"), and if that value is higher than 0 and less than what I have got in Range("I10"), I want the value of Range("I4") to be Range("H10") and so on. I have 20 select cases...
I'm not sure if select case is the best solution to my problem? But this is what I have got so far:
Sub selectcase()
Select case Range ("I3") > Range("I10:I30") And Range("I3") < Range ("I10:I30")
Case Range ("I3") > 0 And < Range("I10")
Range("I4").Value = Range("H10")
Case Range ("I3") > Range("I10") And < Range("I11")
Range("I4").Value = Range("H10")
Case Range ("I3") > Range("I11") And < Range("I12")
Range("I4").Value = Range("H11")
Case Range ("I3") > Range("I12") And < Range("I13")
Range("I4").Value = Range("H12")
'and so on...
When I try this I get the message Run time error Type mismatch
Sorry if this is not the right place to post my question, if my English is not satisfying or my question is confusing!!
Bookmarks