Forum Discussion

Rev_AmyA's avatar
Rev_AmyA
Copper Contributor
Jul 11, 2024

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.

1 Reply

  • Rev_AmyA 

    1. 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.
    2. Make sure that the Show Formulas button in the Formula Auditing group of the Formulas tab of the ribbon is not highlighted.

Resources