I'm trying to make a code that will look and see if columns meet certain criteria then Q= a value in text. Like below. But I need to do this in each cell from 2 to 500 and if Q2 = 4 then R2 = 5 S2 = 3 and T2 = 1 or 2
If [L2] = "" Or [L2] = "/" And CBool((Sgn([C2] - 1) + Sgn(30 - [C2])) > 0) And CBool((Sgn([E2] - 1) + Sgn(3556 - [E2])) > 0) Then [Q2].Value = "4" |
Criteria I'm following is
4 if L= Blank or /, C = 1 through 30, and E = 1 through 500 or C= 1 through 12 and E = 1 through 999
5 if M= Blank or /, C = 1 through 30, and E = 1 through 500 or C= 1 through 12 and E = 1 through 999
6 if L= Blank or /, C = 10 through 12, and E = 1000 through 5000
7 if L= Blank or /, C = 10 through 12, and E = 1000 through 8000
9 if L= Blank or /, C = 24 through 30, and E = 500 through 2000 or C = 31 through 36 and E = 1 though 500
13 if L= Blank or /, C = 31 through 36, and E = 500 through 2000 or C = 37 through 42 and E = 1 though 500
13 if M= Blank or /, C = 24 through 30, and E = 500 through 2000 or C = 31 through 38 and E = 1 though 500
14 if L= Blank or /, C = 38 through 52, and E = 1 through 2000 or C = 31 through 38 and E = 1 though 500
14 if M= Blank or /, C = 38 through 42, and E = 500 through 2000
15 if L= Blank or /, C = 52 through 180, and E = 1 through 8000
15 if M= Blank or /, C = 43 through 180, and E = 1 through 8000
3 if N= Blank or /, C = 1 through 20, and E = 1 through 8000 or C = 20 through 30 and E = 1 through 500
1 or 2 if O = Blank or /, C = 1 through 20, and E = 1 through 8000 or C = 20 through 24 and E = 1 through 500
12 if N = Blank or /, C = 20 through 24, and E = 500 through 8000 or C = 24 through 38 and E = 1 through 8000
12 if O = Blank or /, C = 20 through 24, and E = 500 through 8000 or C = 24 through 38 and E = 1 through 8000
15 if N = Blank or /, C = 38 through 180, and E = 1 through 8000
15 if O = Blank or /, C = 38 through 180, and E = 1 through 8000
I hope I explained this good enough as I know it's a lot of data to look at.
Any help will be greatly appreciated!