this is working fine however, if rr = "misc" then the macro should look for all ccode values not equal to "0305", "0385" or "0399", not quite sure how to code that
I get the rr value with the code below:
there is a loop that loops through values in the B colum where rev is a worksheet
if rr = misc then I want it to pull all values that are NOT "0305", "0385", or "0399"
any insight would be appreciated
I get the rr value with the code below:
Code:
If ms.Buttons(Application.Caller).Name = "recs0305" Then rr = "0305"
If ms.Buttons(Application.Caller).Name = "recs0385" Then rr = "0385"
If ms.Buttons(Application.Caller).Name = "recs0399" Then rr = "0399"
If ms.Buttons(Application.Caller).Name = "recsmisc" Then rr = "misc"
if rr = misc then I want it to pull all values that are NOT "0305", "0385", or "0399"
Code:
ccode = Left(rev.Range("B" & Lrow).Value, 4)
If .Value <> "" And ccode = rr Then
any insight would be appreciated