How to include 2 separate IF and ISBLANK functions in 1 cell?

Is this possible? I’ve searched online and tried shifting things around, but all methods have failed.
I want the function to follow the following steps:

  1. If I30 is “A” use J30
    • but if J30 is blank, leave field blank
  2. If I30 is not “A”, use K30
    • but if K30 is blank, leave field blank

Below are my attempts:

=IF(AND(I30 = "A",(ISBLANK(J30),"",J30),IF(AND(ISBLANK(K30),"",K30))))

The 2nd to last function always changes the “,J30” at the end to “~J30”, btw.

To be clear, this function for ISBLANK works just fine:


Edit: Corrected the ISBLANK function.


is incorrect and yields probably Err:509

Check `=IFS(I30="A";IF(ISBLANK(J30);"";J30);I30<>"A";IF(ISBLANK(K30);"";K30))`

:frowning: I meant:


Yours worked, btw.

Edit: Finally got it.

for such a simple task … why so complicated?

just try


or am i wrong?

kiss - keep it simple and stupid

P.S. solved marks and likes ‘^’ welcome …

another try with IFS:

=IFS(AND(I30="A"; J30<>"");J30; AND(I30<>"A"; K30<>"");K30; 1;"")


Best answer 1+