ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If And Or (https://www.excelbanter.com/excel-worksheet-functions/81015-if.html)

mateo107

If And Or
 

I need to make the following formula and I can't get the syntax right..
can anyone help me?

If A1 < "" AND B1 OR C1 OR D1 or E1 < "" THEN Put "50" in column G1

In words...
If A1 is not blank, and any number of B1 through E1 are not blank, then
put the number 50 in column g1.

Here are some sample outputs in case i couldn't describe this right:

A1 = abcsd | B1 = absdf || G1 = 50
A1 = absdf | D1 = adfsf C1 = 22 || G1 = 50
A1 = adlkaj || G1 = " " (nothing)

Get the idea?


--
mateo107
------------------------------------------------------------------------
mateo107's Profile: http://www.excelforum.com/member.php...o&userid=22299
View this thread: http://www.excelforum.com/showthread...hreadid=528892


Biff

If And Or
 
Hi!

Try one of these:

=IF(AND(A1<"",OR(B1<"",C1<"",D1<"",E1<"")),50 ,"")

This one is an array and needs to be entered using the key combo of
CTRL,SHIFT,ENTER:

=IF(AND(A1<"",OR(B1:E1<"")),50,"")

This one assumes that the range B1:E1 will not contain any formula blanks:

=IF(AND(A1<"",COUNTA(B1:E1)),50,"")

Biff

"mateo107" wrote in
message ...

I need to make the following formula and I can't get the syntax right..
can anyone help me?

If A1 < "" AND B1 OR C1 OR D1 or E1 < "" THEN Put "50" in column G1

In words...
If A1 is not blank, and any number of B1 through E1 are not blank, then
put the number 50 in column g1.

Here are some sample outputs in case i couldn't describe this right:

A1 = abcsd | B1 = absdf || G1 = 50
A1 = absdf | D1 = adfsf C1 = 22 || G1 = 50
A1 = adlkaj || G1 = " " (nothing)

Get the idea?


--
mateo107
------------------------------------------------------------------------
mateo107's Profile:
http://www.excelforum.com/member.php...o&userid=22299
View this thread: http://www.excelforum.com/showthread...hreadid=528892




Pete_UK

If And Or
 
Try this in cell G1:

=IF(AND(A1<"",OR(B1<"",C1<"",D1<"",E1<"")),50 ,"")

Hope this helps.

Pete


JE McGimpsey

If And Or
 
One way:

=IF(AND(A1<"",COUNTA(B1:E1)0),50,"")

In article ,
mateo107
wrote:

I need to make the following formula and I can't get the syntax right..
can anyone help me?

If A1 < "" AND B1 OR C1 OR D1 or E1 < "" THEN Put "50" in column G1

In words...
If A1 is not blank, and any number of B1 through E1 are not blank, then
put the number 50 in column g1.

Here are some sample outputs in case i couldn't describe this right:

A1 = abcsd | B1 = absdf || G1 = 50
A1 = absdf | D1 = adfsf C1 = 22 || G1 = 50
A1 = adlkaj || G1 = " " (nothing)

Get the idea?


daddylonglegs

If And Or
 

=if(len(a1)*len(b1&c1&d1&e1),50,"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=528892



All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com