EXCEL: SUMIF In Array Formula Causing Errors - excel

I have noticed that SUMIF does not play nice with array formulas.
To save on convoluted explanations of my motivation, here is a sample that demonstrates the issue:
=SUMIF(ROW(INDIRECT("1:10")),"<5")
My current work around would be:
=SUM(ROW(INDIRECT("1:10"))*IF(ROW(INDIRECT("1:10"))<5,1,0))
But my actual formula is quite lengthy and I don't want to repeat the criteria in both places.
Can anyone help me understand what's going on?
Thank you

Related

INDIRECT FORMULA

I am having trouble working out an error I am having with the formula below, I am a bit of a novice and its been more trial and error than anything so far but, I was hoping someone with a far greater knowledge could point out where I am going wrong.
The formula works fine without the indirect element I.e.
=SUMPRODUCT((PARROT!$o$12:$o$250<>"COMPLETE")*(PARROT!$n$12:$n$250<TODAY()))
but I want to replace the sheet name with an INDIRECT address as the name of the sheet could change
so the formula I came up with is but, it has an error:
=SUMPRODUCT(INDIRECT("'"&$A3&"'!$o$12:$o$250"),"<>"&"Complete")*(INDIRECT("'"&$A3&"'!$N$12:$N$250")<TODAY())
Help would be very much appreciated.
From your formula it seems you are just counting rows where O12:O250 is not equal Complete and N12:N250 is earlier than today. So, you can use COUNTIFS() formula with INDIRECT() easily. Try below.
=COUNTIFS(INDIRECT($A$3&"!$O$12:$O$250"),"<>Complete",INDIRECT($A$3&"!$N$12:$N$250"),"<"&TODAY())
If you need to sum values from a column then SUMIFS() will be your friend.

What am i missing with this formula can you help to expand it?

Morning All,
Ive been working a on a spreadsheet and it came back with some requests to refine and simplify it, as such iv come up with a new solution but the below formula i cant for the life of me figure out why its bringing back the #Value Error.
=IF(L6="YES",K6+7,IF(L6,"-",""))
In a nut shell i want this formula to do the following,
IF L6 is Yes then calculate K6+7 If L6 is blank then leave it blank and dont calculate
Firstly am i on the right lines here and if so what on earth am i missing? Im still getting my excel knowledge up at the moment so bear with me.
Thanks in advance.
You are missing an = in the second IF formula:
=IF(L6="YES",K6+7,IF(L6="",""))
Your formula should look like this
=IF(L6="YES",K6+7,IF(isblank(L6),,"-"))
The value error was due to the fact a blank cell is considered as false by default but a cell with text cannot be converted to a boolean value.

Excel: In what order a word appear

I have this case right here. The table below is what I expect, but it's originally without a formula.
Info for the pic:
On the green cell, i'd like to find two criteria from two different cells: "Car" & "Ford", in what line are they?
The blue cell is the second example. It is the same but different criteria. So I want to do this to build a product number with my own formula that I already built, except this last things.
My question is:
What formula that can do that. I did a full day research on the internet, google and youtube. But I don't get and answer. And I'm not an expert in a excel. I only did and googling all the things I did in excel. So please help me find out how.
Thank You
In this example the formula shown is entered in E2 and filled down.
Note this is an array formula, so use Ctrl+Shift+Enter to enter it.
I'd personally suggest you look into Pivot Tables. They do exactly what you want and probably more.
https://support.office.com/en-us/article/Create-a-PivotTable-to-analyze-worksheet-data-A9A84538-BFE9-40A9-A8E9-F99134456576

Excel formula doesn't work on formula results

I have a range of numbers (Y6:AC6) which are obtained as a function of =RIGHT(Text,Num) formula. When I try to apply COUNTIFS formula on these numbers which you can see on the picture, it doesn't work. However, when I try the same formula on actual numbers, but not functional results of RIGHT(Text,Num), it works. What am I missing here? can someone help me please? thanks.

Trim down an excel formula?

Hey I'm trying to get my excel formula to fit in to a data validation formula, which after a little research I'm finding has a 255 character limit. Mine has 277 characters, and I feel like it's got some redundancies, but I'm not advanced enough to figure out how to trim this heffer down. Can anyone out there help?
=IF(AND(H11="Embryo",G11<>"F2"),INDIRECT("'"&C11&"'"&"!$g$24:$g$27"),IF(AND(H11="Seed",G11<>"F2"),INDIRECT("'"&C11&"'"&"!$h$24:$h$27"),IF(AND(H11="Seed",G11="F2"),INDIRECT("'"&C11&"'"&"!$g$117:$g$120"),IF(AND(H11="Embryo",G11="F2"),INDIRECT("'"&C11&"'"&"!$h$117:$h$120"),E2))))
As you always include the cell C11 inside an INDIRECT please consider the following formula that places the INDIRECT outside while the conditionals just return the range addresses as strings.
=INDIRECT("'"&C11&"'"&IF(AND(H11="Embryo",G11<>"F2"),"!$g$24:$g$27",IF(AND(H11="Seed",G11<>"F2"),"!$h$24:$h$27",IF(AND(H11="Seed",G11="F2"),"!$g$117:$g$120",IF(AND(H11="Embryo",G11="F2"),"!$h$117:$h$120",E2)))))
Please note that this logic will break if none of the conditions are met. Regards,
I'd suggest taking some of the parts of your formula and defining names for those regions of your sheet this way you can condense long strings into small words greatly reducing the length of your formula. Could help a great deal. Also will make your formula more readable to you down the road when you find yourself having to debug it.

Resources