# write a formula referencing a cell with another formula in excel

• I am haveing trouble returning a value for a formula in excel , it may be a simple solution but I can not seem to find an answer on other excel help sites.

I have a calculation in one cell and I need to use the value returned in that cell to determine what needs to be populated in the next cell.

In cell AK2 I have the following formula: =IFERROR((AH2-AI2-AJ2)&"","")

I am trying to put the following formula in cell AL2: =IF(AK2="","",IF(AK2=3,"3",IF(AK2=2,"2",IF(AK2=1,"1",IF(AK2=0,"1")))))

I am assuming the issue has to do with the formula in cell AK2 because, if I clear out the formula in cell and just replace it with a number, the formula works.

• Re: write a formula referencing a cell with another formula in excel

Hello.

I don't know the context of what you're trying to do, but you might be right.

The formula in AK2 results in a text value, not a number value. That's why you might want to change it.

As I said before, I don't know the context of your work, but if you use =INT(IFERROR((AH2-AI2-AJ2)&"","")) you will get a numeric value (in this case, an integer).

Let me know if this works.

Cheers!

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!