Ask Your Question
1

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

asked 2020-09-05 14:58:24 +0200

yarow12 gravatar image

updated 2020-09-05 20:38:07 +0200

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",IF(AND(ISBLANK(J30),"",J30)),K30))
=IF(AND(I30 = "A",(ISBLANK(J30),"",J30),IF(AND(ISBLANK(K30),"",K30))))
=IF(AND(I30<>"A",(ISBLANK(J30),"",K30)))
=IF(AND(I30<>"A",(ISBLANK(J30),"",K30~J30)))
=IF(I30<>"A",1,3)

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:

=IF(ISBLANK(J30),"",J30)

Edit: Corrected the ISBLANK function.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by yarow12
close date 2020-09-07 02:02:20.676800

Comments

2

=ISBLANK(J30),"",J30

is incorrect and yields probably Err:509


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

Opaque gravatar imageOpaque ( 2020-09-05 16:07:47 +0200 )edit

:( I meant:

=IF(ISBLANK(J30),"",J30)

Yours worked, btw.

Edit: Finally got it.

yarow12 gravatar imageyarow12 ( 2020-09-05 20:43:17 +0200 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2020-09-05 19:08:09 +0200

newbie-02 gravatar image

updated 2020-09-05 20:04:24 +0200

for such a simple task ... why so complicated?

just try

=IF(I30="A";IF(J30<>"";J30;"");IF(K30<>"";K30;""))

or am i wrong?

kiss - keep it simple and stupid

P.S. solved marks and likes '^' welcome ...

[edit]
another try with IFS:

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

[/edit]

edit flag offensive delete link more

Comments

Best answer 1+

igorlius gravatar imageigorlius ( 2020-09-05 19:32:28 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-05 14:58:24 +0200

Seen: 93 times

Last updated: Sep 05 '20