SOLVED

IF -Isblank function to check two cells are blank

Copper Contributor

Hi 

I was putting a formula in column P

=IF(ISBLANK(M3),K3*N3,M3*N3)+O3 which checks if there is any value is there in column M and takes the rest calculation if M is blank... and if there is no value in M & K it returns 0. 

If both M and K columns are blank I wish to get the value in P as blank... I don't want 0 to appear 

 

Is there any possible way ….. Please guide...

 

Regards & thanks in advance.

 

8 Replies

@pillaisg 

As variant

=IF(ISBLANK(M3)*ISBLANK(K3),"",O3+(K3*ISBLANK(M3)+M3)*N3)

 

 

best response confirmed by pillaisg (Copper Contributor)
Solution

Exactly what I needed.

Can you please elaborate it...

Thanks@Sergei Baklan 

@pillaisg 

If both K3 and M3 are blank we return empty string. Just in case

ISBLANK(M3)*ISBLANK(K3)

is equivalent of

AND(ISBLANK(M3),ISBLANK(K3))

 since in calculations TRUE is converted to 1 and FALSE to zero.

 

In second part

(K3*ISBLANK(M3)+M3)

if M3 is blank that will be

(K3*1+0)          or simply K3

if M3 is not blank that will be

(K3*0+M3)      or simply M3

 

Thank you for marking as accepted solution, but better to move Best response on answer itself.

It had added a different way of thinking

Thanks it was of great help.

Thanks @Sergei Baklan 

@pillaisg , you are welcome

I hv 5 cell in excel A,B,C,D & E
IF C,D,E BLANK THEN B-A
IF D&E BLANK C-A
IF E&C BLANK D-A
IF C&D BLANK E-A

I am trying to write formula since Sundays but fail kindly help me to write this formula in excel

@Annujgd 

In a cell in row 2, for example in F2:

 

=IFS(AND(C2="",D2="",E2=""),B2-A2,AND(D2="",E2=""),C2-A2,AND(C2="",E2=""),D2-A2,AND(C2="",D2=""),E2-A2,TRUE,"None of these")

 

@Annujgd 

Perhaps

=LOOKUP(2, 1/(A2:E2<>""), A2:E2)-A2
1 best response

Accepted Solutions
best response confirmed by pillaisg (Copper Contributor)
Solution

Exactly what I needed.

Can you please elaborate it...

Thanks@Sergei Baklan 

View solution in original post