# IF Formula - Populate a cell only when another cell is filled

1. ## IF Formula - Populate a cell only when another cell is filled

Hi, I have attached an excel doc.

Would be grateful with a little help with 2 formulas.
In the table under the Points+/- header (column F) and Profit +/- (column H)
how do I get the cells to only show data when the Closing Price (column J) has been filled?

To recap, I would like the cells to remain blank when the Status (column E) says Closed and only have columns F & J populate
when column J is filled.

Help would be very much appreciated, thanks.  Register To Reply

2. ## Re: IF Formula - Populate a cell only when another cell is filled

Here is the excel worksheet  Register To Reply

3. ## Re: IF Formula - Populate a cell only when another cell is filled

You can wrap your formula into an IF statement. Below is the sample for column F:

=IF([@[Closing Price]]<>"",IFERROR(IF(LEFT([@Status],3)="Ope"," N/A - Open Trade",IF([@[Long/Short]]="Short",[@[Entry Price]]-[@[Closing Price]],[@[Closing Price]]-[@[Entry Price]])),"Error Check Column"),"")

If it works for you, wrap the second formula into the same if statement.  Register To Reply

4. ## Re: IF Formula - Populate a cell only when another cell is filled

Hi ORoos, thanks for sending this.
But would you be able to have the 'Points+/-' and 'Profits +/-' still show 'N/A - Open Trade' if the Status has 'Open' or 'Position Risk-Free' showing?
At the moment the 'Points+/-' and 'Profits +/-' remains blank until 'Closing Price' has been filled with data.

So basically the logic is that when 'Open' or 'Position Risk-Free' is showing status there will be no need to have a closing price, therefore
'Points+/-' and 'Profits +/-' should say 'N/A - Open Trade'
Once anything else is selected in the 'Status' dropdown' beginning with Trade Closed, then I would like the 'Points+/-' and 'Profits +/-'
to become blank and populate only when 'Closing Price' has been filled.

Hope that makes sense. :-)  Register To Reply

5. ## Re: IF Formula - Populate a cell only when another cell is filled

It's a little confusing, but I think you can try this under "Points+/-"

=IFERROR(IF(OR([@Status]="Open",[@Status]="Trade Open - Risk-Free"),"N/A - Open Trade",IF([@[Closing Price]]="","",IF([@[Long/Short]]="Short",[@[Entry Price]]-[@[Closing Price]],[@[Closing Price]]-[@[Entry Price]]))),"Error Check Column")  Register To Reply

6. ## Re: IF Formula - Populate a cell only when another cell is filled

That worked @Gregb11 thanks.
How do I input that into Profit +/- correctly.
Look forward to hearing back.  Register To Reply

7. ## Re: IF Formula - Populate a cell only when another cell is filled

Hi can anyone help with with the above issue?

Thanks  Register To Reply

8. ## Re: IF Formula - Populate a cell only when another cell is filled

I didn't know how much of your current formula you wanted to keep, but you can try this in H3 and see if it does what you want. If not, please let us know what condition is not working.  Register To Reply

9. ## Re: IF Formula - Populate a cell only when another cell is filled

Hi Gregb11 it is saying that the syntax of the name isn't correct when I add the formula you just sent.  Register To Reply

10. ## Re: IF Formula - Populate a cell only when another cell is filled

Gregb11, ignore my last message as I could input the formula.
The only thing is that when the Profit +/- should show an amount once the other cells are filled, it is just saying N/A - Check Row Inputs  Register To Reply

11. ## Re: IF Formula - Populate a cell only when another cell is filled

Can you give a specific example or upload the file that shows the scenario? It's only showing "N/A - Check Row Inputs" when Status = "Open" or "Trade Open - Risk Free". I've upload my file.  Register To Reply

12. ## Re: IF Formula - Populate a cell only when another cell is filled

Gregb11 sorry I did something wrong and your formula works fine.
Thanks a lot for your help with this.

Much appreciated  Register To Reply

13. ## Re: IF Formula - Populate a cell only when another cell is filled  Register To Reply