ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   using IF & AND (https://www.excelbanter.com/excel-discussion-misc-queries/115085-using-if.html)

xeno

using IF & AND
 
I am trying to get "1" to display in a cell if the value of L4 is 1, and the
sum of M4 & P4 is 0.(if this is false i want nothing to display).
I got as far as the following formula, but can't quite seem to get it to work.
Thanks if anybody can tell me the adjustment i need to make



=IF(=AND(L4=1,=SUM(P4,M4)=0))=1,1,"")

Jim Thomlinson

using IF & AND
 
Very close but... try this...

=IF(AND(L4=1,SUM(P4,M4)=0),1,"")
--
HTH...

Jim Thomlinson


"xeno" wrote:

I am trying to get "1" to display in a cell if the value of L4 is 1, and the
sum of M4 & P4 is 0.(if this is false i want nothing to display).
I got as far as the following formula, but can't quite seem to get it to work.
Thanks if anybody can tell me the adjustment i need to make



=IF(=AND(L4=1,=SUM(P4,M4)=0))=1,1,"")


xcellentform

using IF & AND
 

xeno wrote:
I am trying to get "1" to display in a cell if the value of L4 is 1, and the
sum of M4 & P4 is 0.(if this is false i want nothing to display).
I got as far as the following formula, but can't quite seem to get it to work.
Thanks if anybody can tell me the adjustment i need to make



=IF(=AND(L4=1,=SUM(P4,M4)=0))=1,1,"")



What about adding a new column called Z to add coumns M and P and then
do a simple formula IF(Z4=0,1,"") if that works, then change the column
width of Z to 0. I know the whole thing is sloppy, and not a neat
little formula, but it should work.


xeno

using IF & AND
 
thanks muchly, i can see my errors!

"Jim Thomlinson" wrote:

Very close but... try this...

=IF(AND(L4=1,SUM(P4,M4)=0),1,"")
--
HTH...

Jim Thomlinson


"xeno" wrote:

I am trying to get "1" to display in a cell if the value of L4 is 1, and the
sum of M4 & P4 is 0.(if this is false i want nothing to display).
I got as far as the following formula, but can't quite seem to get it to work.
Thanks if anybody can tell me the adjustment i need to make



=IF(=AND(L4=1,=SUM(P4,M4)=0))=1,1,"")


xeno

using IF & AND
 
Thanks,
i will try the edited formula first, but i like your thinking, i kick myself
for not seeing it! - i am sure to find uses for this type of fix in the future

"xcellentform" wrote:


xeno wrote:
I am trying to get "1" to display in a cell if the value of L4 is 1, and the
sum of M4 & P4 is 0.(if this is false i want nothing to display).
I got as far as the following formula, but can't quite seem to get it to work.
Thanks if anybody can tell me the adjustment i need to make



=IF(=AND(L4=1,=SUM(P4,M4)=0))=1,1,"")



What about adding a new column called Z to add coumns M and P and then
do a simple formula IF(Z4=0,1,"") if that works, then change the column
width of Z to 0. I know the whole thing is sloppy, and not a neat
little formula, but it should work.




All times are GMT +1. The time now is 06:09 AM.

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