ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   simple formula (https://www.excelbanter.com/excel-worksheet-functions/30975-simple-formula.html)

Brian

simple formula
 
I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.

Biff

Try one of these:

normally entered:

=IF(OR(C1D1,C2D1,C3D1,C4D1),G1,"")

array entered with the key combo of CTRL,SHIFT,ENTER:

=IF(OR(C1:C4D1),G1,"")

Biff

"Brian" wrote in message
...
I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither
one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.




mangesh_yadav


=IF(SUMPRODUCT(--(C1:C4D1))0,G1,"")

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=379588


paul

and will return true if all arguements are true,or will return true if only
one argument is true
--
paul
remove nospam for email addy!



"Brian" wrote:

I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.


Duke Carey

Try

=if(or(c1:c4)d1,g1,"")

but commit the formula by pressing Ctrl-Shift-Enter to make it an array
formula



"Brian" wrote:

I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.


bj

try
=if(or(C1D1,C2D1,C3D1,C5D1),G1,"")
or
=if(max(C1:C4)D1,G1,"")

"Brian" wrote:

I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.


bj

This may be a second response but
try
=if(or(C1D1,C2D1,C3D1,C4D1),G1,"")
or
=if(max(C1:C4)D1,G1,"")


"Brian" wrote:

I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.


Greg Neill

"Brian" wrote in message
...
I am having trouble with "and" , "or" in my formulas.

If I want one of c1:c4 to be true is this the formula to use
=if((c1:c4)d1),g1,"") or should I use =if(or(c1:c4)d1),g1,""). Neither
one
of these formulas seems to work. In other words, I am trying to write a
shorter formula for the following:

=if(c1d1 or c2d1 or c3d1 or c4d1, G1,"")

Thanks for help with this simple formula.


How about

=if (MAX(c1:c4)d1,g1,"")




All times are GMT +1. The time now is 08:02 AM.

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