Forum Discussion
Rev_AmyA
Jul 11, 2024Copper Contributor
I need help writing code using the IF statement and COS in excel.
This is what I am trying to do: =IF(B5=1,COS(F5)*G5, IF(B5=4,-COS(F5)*G5)). What I get in the cell is just a repeat of the code and not a value.
HansVogelaar
Jul 11, 2024MVP
- Make sure that the cell with the formula is not formatted as Text. If it is, change the number format to General or to Number, then press F2 and Enter to re-enter the formula.
- Make sure that the Show Formulas button in the Formula Auditing group of the Formulas tab of the ribbon is not highlighted.