Probably an incredibly easy change but I seem to have a brain fart in this. I have a column and I want my formula to search for both "Open" and "In-Transit".
=COUNTIFS('Warner Robins'!A:A,"Open",'Warner Robins'!G:G, "PAB")
perhaps:
=COUNTIFS('Warner Robins'!A:A,"Open",'Warner Robins'!G:G, "PAB")+COUNTIFS('Warner Robins'!A:A,"In-Transit",'Warner Robins'!G:G, "PAB")
Building an OR into a formula can be tough...........easier to just add up the cases.
Or you can go with this one:
=SUM(COUNTIFS('Warner Robins'!A:A,{"Open","In-Transit"},'Warner Robins'!G:G, "PAB"))
Generally makes it easier for multiple OR clauses.
Related
My data is as follows:
I need to find the index of the matching template. Now I am using the complicate finction:
=IF(COUNTIF(A2,D$2)>0,1,IF(COUNTIF(A2,D$3)>0,2,IF(COUNTIF(A2,D$4)>0,3,0)))
Is there any better way?
I know that I probably could just determine UDF with VBA which would iterate through the templates range but I would avoid it.
I can find the best cell based on the template with MATCH().
But I need the opposite direction.
And I know that I could probably use Fuzzy Lookup. But I would again avoid it.
Since we are numbering according to the values we are looking for in the cell, I could not see a solution other than the if command. Because we are looking for more than one template and moving forward.
It's not the solution you want, but it might be a different alternative.
=IF(IFERROR(FIND($D$2,A2),0)>0,1,IF(IFERROR(FIND($D$3,A2),0)>0,2," "))
I was just wondering if this is the proper way to nest this many conditions. It does work, just looks like it could be written simpler.
=IF(H13>0,IF(H14>0,IF(H15>0,IF(H16>0,IF(H17>0,IF(H18>0,IF(H19>0,"Yes","No"),"No"),"No"),"No"),"No"),"No"),"No")
Above formula can be written as
=IF(COUNTIF(H13:H19,">0")=7,"Yes","No")
You can use AND
=IF(AND(H13>0,H14>0,H15>0,H16>0,H17>0,H18>0,H19>0),"Yes","No")
Also use OR
=IF(OR(H13<=0,H14<=0,H15<=0,H16<=0,H17<=0,H18<=0,H19<=0),"No","Yes")
I am trying to combine two forumlas into one.
They both work individually and I would like to make it so the condition is only met if both formulas are met. The forumlas are:
=IF(AND(Sheet2!$C$6>40,Sheet2!$C$6<=50),TRUE,FALSE)
=IF((INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","3"))>=Sheet2!$B$6),TRUE,FALSE)
I have tried to use another AND clause but had no luck yet with this, would anyone be able to provide a consolidated formula for both of these?
the long way:
=IF(AND(Sheet2!$C$6>40,Sheet2!$C$6<=50,INDIRECT("R3C"&COLUMN(),)>=Sheet2!$B$6), TRUE, FALSE)
the short way:
=AND(Sheet2!$C$6>40,Sheet2!$C$6<=50,INDIRECT("R3C"&COLUMN(),)>=Sheet2!$B$6)
also possible:
=((Sheet2!$C$6>40)*(Sheet2!$C$6<=50)*(INDIRECT("R3C"&COLUMN(),)>=Sheet2!$B$6))=1
why the SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","3")??? just ADDRESS(3,COLUMN(),4) will be the same... also why address at all? justINDIRECT("R3C"&COLUMN(),) will also work
Compiling the comments, this should be the minimal formula gathering your tests :
=AND(Sheet2!$C$6>40,Sheet2!$C$6<=50,INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","3"))>=Sheet2!$B$6)
So,
what i am trying to accomplish here is pretty straight forward, i have a column fare in my spreadsheet and i want to add anew column that would say if the fare is <10 ,10<20,20<30,30+
I came up with this solution but it seems like it is not using a shortcut condition, is there a case statement or any other method i can use to achieve what i want?
=if(J19<10,"<10",IF(AND(J19>10,J19<20),"10<20",IF(AND(J19>20,J19<30),"20<30","30+"
)))
Try something like this:
=ROUNDDOWN(A1,-1)&"<"&ROUNDUP(A1,-1)
Since the conditions in a nested set of if functions are evaluated consecutively, you do not need to repeat previous conditions using and. Also note that your original formula doesn't do the right thing at the borderlines, e.g. if J19=10.
So although Excel does not have a case function, the following is simpler and more accurate than your original:
=if(J19<10,"<10",IF(J19<20,"10<20",IF(J19<30,"20<30","30+")))
I need help in combining two IF condition statements in excel. Both are working fine, just that when I try to combine them then I'm getting error. Below are the conditions:
=IF(AND(F19="No", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52)))),"Section Complete","Section Incomplete")
=IF(AND(F19="Yes", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52),ISBLANK(D43),ISBLANK(D44),ISBLANK(D45),ISBLANK(D46),ISBLANK(D47),ISBLANK(D48),))),"Section Complete","Section Incomplete")
Please help me in combining them.
Thanks in advance, Krishna
... I didn't try and make it prettier / more efficient - I just used your original formulas, but this should do what you want:
=IF(OR(AND(F19="No", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52)))),AND(F19="Yes", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52),ISBLANK(D43),ISBLANK(D44),ISBLANK(D45),ISBLANK(D46),ISBLANK(D47),ISBLANK(D48))))),"Section Complete","Section Incomplete")
Hope this does the trick!!
You could just as simple replace the "Section incomplete" in the first No-IF, by replacing it with the Yes-IF.
=IF(AND(F19="No";NOT(OR(ISBLANK(B36);ISBLANK(B37);ISBLANK(D36);ISBLANK(D37);ISBLANK(B40);ISBLANK(D39);ISBLANK(F39);ISBLANK(D40);ISBLANK(F40);ISBLANK(B43);ISBLANK(B44);ISBLANK(B48);ISBLANK(B49);ISBLANK(B50);ISBLANK(B51);ISBLANK(B52))));"Section Complete";IF(AND(F19="Yes";NOT(OR(ISBLANK(B36);ISBLANK(B37);ISBLANK(D36);ISBLANK(D37);ISBLANK(B40);ISBLANK(D39);ISBLANK(F39);ISBLANK(D40);ISBLANK(F40);ISBLANK(B43);ISBLANK(B44);ISBLANK(B48);ISBLANK(B49);ISBLANK(B50);ISBLANK(B51);ISBLANK(B52);ISBLANK(D43);ISBLANK(D44);ISBLANK(D45);ISBLANK(D46);ISBLANK(D47);ISBLANK(D48);)));"Section Complete";"Section Incomplete"))
Try simplifying with some COUNTA functions like this:
=IF(AND(COUNTA(B36,B37,D36,D37,B40,D39,F39,D40,F40,B43,B44,B48:B52)=16,OR(F19="No",AND(F19="Yes",COUNTA(D43:D48)=6))),"Section Complete","Section Incomplete")
That should combine the two formulas without repetition