if(isnumber) with multiple cells - excel-formula

I am using the following logic function =IF(ISNUMBER(B5),B5*B2,"") which works great but what I need is if B5 is blank the formula must go on and check C5 for a number to be multiplied similarly. I realise the following formula has too many arguments but hopefully someone out there can steer me in the correct direction.
=IF(ISNUMBER(B5),B5*B2,(ISNUMBER(C5,C5*B2,""))

Try this, it's an embedded if function
=IF(ISNUMBER(B5),B5*B2,IF(ISNUMBER(C5),C5*B2,IF(ISNUMBER(D5),D5*B2,"")))

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.

Value from an IF Statement then SUM Excel

hopefully this is a quick fix.
I have two columns of data, column A1 already populated and column B2, which will be populated ad hoc, then based on whether there is data in either cell, carry out a calculation (E3*D3)then multiplied by the value of the cell either A1 or B2.
So I am fine with the basic IF statements below, and can combine them using IF(OR, but I am stuck using an IF to look at B2 is it greater or less than A1, but doesn't equal 0, then use that value as part of a multiplication (E3*D3)*value ?
Is this possible?
Examples
=IF(B3=0,(SUM(E3*D3)*A3))
=IF(B2=A2,(SUM(E2*D2)*B2))
I hope I have made some form of sense, any help will be greatly appreciated.
Cheers
Try this out:
=IF(AND(B3<>0, B3<>A3), E3*D3*B3, E3*D3*A3)

Does anyone know what is wrong with my formula in cell E17?

The code could not work well. I do not understand what the mistake is. I wrote a formula in cell E17 and dragged it down to E22, but the formula does not work at all.
Use the forth criterion, Also use MATCH instead of the nested if.
=VLOOKUP(C17,$B$4:$G$7,MATCH(D17,$B$3:$G$3,0),FALSE)

Using Search Function across multiple columns

I'm trying to figure out how to use the search function across multiple cells (that go horizontally). I can't seem to figure out what's wrong with my formula. I'm trying to search for the word in E16 ("the") across the cells D4-AQ4. The word is in actually D4 so it should turn up as found, but it doesn't. It says not found, however if I just change the formula to just look in D4 it says found. The problem is I need this formula to work so I can test for more words across all those cells to see if they are there or not. Can anyone tell me what's going on?
=IF(ISERROR(SEARCH(E16,$D$4:$AQ$4)>0),"NOT FOUND","FOUND")
You can't have a range in =SEARCH(), it will just return a #VALUE which, in your formula will give you a "Not Found". When in doubt, take out your IF and see what the conditional statement returns.
You can, however, concatenate your cell values together to make a big fat search term. The =CONCATENATE() formula will work, you can just use &:
=IF(ISERROR(SEARCH(E16,CONCATENATE(D4, E4, F4, ... AQ4))>0),"NOT FOUND","FOUND")
or
=IF(ISERROR(SEARCH(E16,D4&E4&F4& ... &AQ4)>0),"NOT FOUND","FOUND")
Either way that one will work. That concatenation is pretty tedious to write, but it's your best bet outside of a quick VBA UDF.

AVERAGEIF in Excel with irregular range

I know is a pretty basic question, but surprisingly, I can't seem to find a solution for it.
I'm looking to averageif every 10th cell that doesn't contain a 0 value, but for some reason the syntax doesn't work. I can't just take a range from between the first and last cell because there are other values in between that I don't want to be part of the average. I would have expected something like the below to work just fine, but it keeps returning an error message.
=AVERAGEIF(C4+C14+C24+C34+C44+C44,"<>0")
Any ideas? Thanks a bunch.
I've figured out a solution to my question (in case anyone comes across this in the future).
Instead of using AVERAGEIF, you can use a combination of the SUM and FREQUENCY functions.
To find the average of these cells [C4+C14+C24+C34+C44+C44] but exclude all 0 values, it looks like this:
=SUM(C4+C14+C24+C34+C44+54)/INDEX(FREQUENCY((C4+C14+C24+C34+C44+C54),0),2)
Credit to this blog for the help: http://colinlegg.wordpress.com/2013/05/04/conditional-average-on-non-contiguous-ranges-using-frequency/
I would use a "helper column"
In B1 enter:
=INDIRECT("C" & 4+10*(ROW()-1))
copy B1 to B2 thru B6
Then use:
=AVERAGEIF(B1:B6,"<>0")

Resources