gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 696
- Office Version
- 2019
- Platform
- Windows
Hello,
Want to turn the cell into a formula using the existing data in the cell.
Im using the following code, but receiving an error.
How to fix?
error message:
Code:
Worksheet:
Want to turn the cell into a formula using the existing data in the cell.
Im using the following code, but receiving an error.
How to fix?
error message:
Code:
VBA Code:
Sub test2()
Sheets("Favs").Range("H4").Activate 'Select
ActiveCell.Formula = "=" & ActiveCell.Formula
Sheets("Favs").Range("H5").Select
ActiveCell.Formula = "=" & ActiveCell.Formula
End Sub
Worksheet:
NBA.xlsm | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | H | I | |||||||
4 | PHI | 6.5 | IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$W4>=$W5,ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"W, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"Rank2, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),ISNUMBER($Q4),($Q4>0),$Q4>$Q5,ISNUMBER($R4),($R4>0),$R4>$R5,ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"Q, R, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$Q4>=$Q5,$S4>=$S5,ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"Q, S, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$R4>=$R5,$S4>=$S5,ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"R, S, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$Q4>$Q5,$R4>0,$R4>$R5,$S4>0,$S4>$S5,ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"Q, R, S, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$K4<=$K5,ISNUMBER($Q4),($Q4>=0.55),ISNUMBER($R4),($R4>0),ISNUMBER($S4),($S4>0),$AR4=TRUE,$AW4<=$AW$1,$Q4>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$Z4>=$Z5,$AA4>=$AA5,ISNUMBER($AL4),($AL4>=.6),ISNUMBER($AM4),($AM4>=.6)),"Z, AA, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$B4=100),"????",""))))))))))))))))))))))))))) | ||||||||
5 | NYK | -6.5 | IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A5,$H$52:$H$66,0)),$W4<=$W5,ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"W, AL:AM>=60%",IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A5,$H$52:$H$66,0)),ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"Rank2, AL:AM>=60%",IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A5,$H$52:$H$66,0)),ISNUMBER($Q5),($Q5>0),$Q4<$Q5,ISNUMBER($R5),($R5>0),$R4<$R5,ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"Q, R, AL:AM>=60%",IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A5,$H$52:$H$66,0)),$Q4<=$Q5,$S4<=$S5,ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"Q, S, AL:AM>=60%",IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$R4<=$R5,$S4<=$S5,ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"R, S, AL:AM>=60%",IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A5,$H$52:$H$66,0)),$Q4<$Q5,$R5>0,$R4<$R5,$S5>0,$S4<$S5,ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"Q, R, S, AL:AM>=60%",IF(AND($A5=$AQ5,$B5<0,$K4>=$K5,ISNUMBER($Q5),($Q5>=0.55),ISNUMBER($R5),($R5>0),ISNUMBER($S5),($S5>0),$AR5=TRUE,$AW5<=$AW$1,$Q5>=.55,ISNA(MATCH($A4,$H$52:$H$66,0)),$Z4<=$Z5,$AA4<=$AA5,ISNUMBER($AL5),($AL5>=.6),ISNUMBER($AM5),($AM5>=.6)),"Z, AA, AL:AM>=60%",IF(AND($A4=$AQ4,$B4<0,$B4=100),"????",""))))))))))))))))))))))))))) | ||||||||
6 | WAS | -2.5 | |||||||||
7 | MEM | 2.5 | |||||||||
Favs |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B5,B7 | B5 | =IF(ISTEXT(A4),IF(B4="PK","PK",IF(B4<0,B4*-1,B4*-1)),"") |
C5,C7 | C5 | =IF(C4="W","L",IF(C4="L","W",IF(C4="PSH","PSH",""))) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
C4:C33 | Cell Value | ="psh" | text | NO |
C4:C33 | Cell Value | ="W" | text | NO |
C4:C33 | Cell Value | ="L" | text | NO |
I4:J33 | Expression | =LEN($I4)>1 | text | NO |
A4:A33,AQ4:AQ33 | Expression | =AND($AX4>$AX$1,$AX4<>"") | text | NO |
A4:A33 | Expression | =NOT(ISERROR(MATCH($A4,$H$52:$H$66,0))) | text | NO |
B4:B33 | Cell Value | <0 | text | NO |
B4:B33 | Expression | =AND($A4=$AQ4,$B4>0,$K4<=$K5,$P4>=0,$Q4>=0.55,$R4>=0,$AR4=TRUE,$AX4<=$AX$1,ISNA(MATCH($A4,$H$52:$H$81,0))) | text | NO |
B4:B33 | Expression | =B4<=-10 | text | NO |
H6:H33 | Expression | =$H6=$AF$51 | text | NO |
H6:H33 | Expression | =$H6=#REF! | text | NO |
H6:H33 | Expression | =$H6=$K$39 | text | NO |
H6:H33 | Expression | =$H6=$N$39 | text | NO |
H6:H33 | Expression | =$H6=$Q$39 | text | NO |
H6:H33 | Expression | =$H6=$T$39 | text | NO |
H6:H33 | Expression | =$H6=$W$39 | text | NO |
H6:H33 | Expression | =$H6=$W$51 | text | NO |
H6:H33 | Expression | =$H6=#REF! | text | NO |
H6:H33 | Expression | =$H6=#REF! | text | NO |
H6:H33 | Expression | =$H6=#REF! | text | NO |
H6:H33 | Expression | =$H6=#REF! | text | NO |
H6:H33 | Expression | =$H6=$N$39 | text | NO |
H6:H33 | Expression | =$H6=$AF$39 | text | NO |
H6:H33 | Cell | contains a blank value | text | NO |