I want to use IF formula twice with Vlookup in order to extract specific data from another sheet with 2 logic commands and using this formula:
=IF($Q$4=DATA!A3,master!A11=DATA!$C$2,VLOOKUP(master!O13,DATA!B3:G52,6))
Kindly suggest me how to apply this formula correctly.Thanks
It seems to me that you need AND():
=IF(AND($Q$4=DATA!A3,master!A11=DATA!$C$2),VLOOKUP(master!O13,DATA!B3:G52,6),"This
message will appear if conditions are not met")
Related
I have two excel datasheets i.e. 'Data' and 'Sheet1'. Now, I am using the following excel formula to bring some data from 'Sheet1' to 'Data':
=IF(AND(Data!B2=Sheet1!A2,Data!C2="Argentina"),Data!AU2:CR2=Sheet1!B2:AY2,NAN)
The formula return "#NAME?".
Can you help solve this issue? Thanks in advance.
You no need to mention destination sheet cells in formula. If function doesn't accept this. Try below formula
=IF(AND(Data!B2=Sheet1!A2,Data!C2="Argentina"),Sheet1!B2,"NAN")
This is advise too large to fit into a comment:
In order to solve such an issue, you can use Formula auditing: it gets into your formula and solves it step by step.
After some evaluations, I get the question to evaluate this formula:
=IF(FALSE, Data!AU2:CR2=Sheet1!B2:AY2, NAN)
And the moment it wants to evaluate Data!AU2:CR2=Sheet1!B2:AY2, I get an error.
I tried to put this formula excerpt as a single formula into a sheet, and as a result I got a complete row, filled with boolean values (which does not fit into one single cell, explaining the problem).
What are you trying to do here? Do you want every single value to be equal? Do you want matches? ...
Ok so I am fairly new to using excels formula functions and I am still learning. What I am trying to do is combine two statements both work independently but I need them together. the two statements are an if statement and a vlookup and are as follows
=IF(C5>=$J$4,"YES","NO")
=VLOOKUP(C6-500,$H$5:$I$8,2)
The vlookup needs to take the spot of the yes part in the if so I don't get the error message that get because some values are below the threshold for the vlookup but I want to simply say that they are not valid hence the if statement.
If there are any better ways to do this I am all ears.
If you want to put VLookup() in the yes part then put the formula as below.
=IF(C5>=$J$4,VLOOKUP(C6-500,$H$5:$I$8,2),"NO")
If you want to control errors by formula then use IFERROR() function. Like
=IFERROR(IF(C5>=$J$4,VLOOKUP(C6-500,$H$5:$I$8,2),"NO"),"")
IFERROR() with VLookup() only.
=IFERROR(VLOOKUP(C6-500,$H$5:$I$8,2),"")
I want to combine a formula that disregards cells where there is a 0 in order to average and also to disregard cells where there is an error such as DIV/0.
I have these two formulas which achieve either of these functions but not both. How would I combine them?
{=AVERAGE(IF(ISNUMBER(M2:P2),M2:P2))}
=AVERAGEIF(M2:P2,"<>0")
You would simply add the criterion of the second to the first:
=AVERAGE(IF(ISNUMBER(M2:P2)*(M2:P2<>0) ,M2:P2))
This is still an array formula and as such needs to be confirmed with Ctrl-Shift-Enter instead of Enter. If done properly then Excel will put {} around the formula.
you could use an if() to check for either condition then use the appropriate average function.
#Scott : better than mine...
I am trying add every other cell if it means a certain criteria. I can add every other cell and SUMIF separately, but for the life of me I can't get to the two to work.
Every other :
SUM(ARRAYFORMULA(IF(ISODD(COLUMN(A2:I2)),A2:I2)))
SUMIF :
SUMIF(A1:H1,"s",A2:H2)
Together:
=SUMIFS((ARRAYFORMULA(IF(ISODD(COLUMN(A2:I2)),A2:I2))),(ARRAYFORMULA(IF(ISODD(COLUMN(A1:I1)),A1:I1))),"s")
HERE is the simplified version of the document I am working with. I want to sum all blue cells that have an "s" in the row above
Use SUMIFS() function instead.
In your case:
=SUMIFS(A2:H2,A1:H1,"=s")
Details here: https://support.office.com/en-us/article/SUMIFS-function-c9e748f5-7ea7-455d-9406-611cebce642b
You'll have to switch to SUMPRODUCT:
=SUMPRODUCT(0+(A1:H1="s"),0+ISODD(COLUMN(A2:H2)),A2:H2)
Apologies - I'm not sure if this will work in Google Sheets as it stands.
Regards
I'm trying to write an averageifs statement based on multiple criteria in dropdown boxes, referencing data in a separate sheet that connects to an ETL query. please ignore criteria in cell D8, and E31-34 is where i need to write the forumlas.
[Dropdown]
[Data]
Formula for D31:
=AVERAGEIFS(Data!O:O,Data!A:A,D5,Data!C:C,D8,Data!B:B,D11,Data!H:H,D17)
Formula For D32:D34 (drag down):
=AVERAGEIFS(Data!O:O,Data!A:A,$D$5,Data!C:C,$D$8,Data!B:B,$D$11,Data!H:H,$D$17,Data!E:E,$B32)
The only thing that didn't make sense to me is the AMS product drop down, but I am sure you can adjust the formula to add that. The only issue you may have is if ALL is an option versus a specific product. The AVERAGEIFS formula will be slightly different (see two examples I gave you), so you may need an IF statement.