Search code examples
excelexcel-formulaformula

IF formula returning a value error or incorrect calculation


I'm trying to get the following conditions in the same formula:

  1. =IF(AND(Input!F51="",Input!G51=""),0)
  2. IF(Input!F51="",Lookups!AM3*Input!G51*Lookups!AF6)
  3. IF(Input!G51="",B23*Input!F51*Lookups!AF6)

I've tried formatting this several ways but either get a #VALUE! error, or the cell returns 0.00 rather than the correct calculation. Please can someone let me know where I am going wrong?


Solution

  • nest:

    =IF(AND(Input!F51="",Input!G51=""),0,IF(Input!F51="",Lookups!AM3*Input!G51*Lookups!AF6,B23*Input!F51*Lookups!AF6))