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
Related
I am trying to figure out how to make the row number portion of my VLOOKUP formula to be generated based on the current row of the cell holding the formula.
=VLOOKUP(D209|M196:O372|2|FALSE)
So in the above, the first parameter is 'D209'. I want the '209' to be generated dynamically based on the current row.
I can get it with
=ROW()
But when I try to combine the two it breaks :(
=VLOOKUP(D=ROW|M196:O372|2|FALSE)
Thanks!
I found the answer:
=VLOOKUP(INDIRECT("D"&ROW())|M196:O372|2|FALSE)
Gotta use INDIRECT()
here is the problem which is pretty self explaining.
I need excel to run through each row in A column and if it's 'volvo' (in this case) i need it to add the value next to it. The sum of values should be in the cell below (A5).
The poor solution which I came up with and does not work is =SUM(IF(ISNUMBER(SEARCH("volvo";A1:A3));B1:B3;0))
Thank you for every reply!
Use SUMIFS()
=SUMIFS(B:B,A:A,"volvo")
I apologize in advance if my question is unclear. It’s my first time posting on this forum. I’m trying to write a Sumifs formula in Excel where one of the criteria is to sum everything except a specific value. I write a small amount in SQL and i use the <> function to eliminate specific values. Is there a similar ability in Excel? Thank you for your help!
With SUMIF() or SUMIFS(), you can use <>:
=SUMIFS($A$1:$A$100,$B$1:$B$100,"<>123")
That will check if a value in your B1:B100 range is 123, and if so, will not use that equivalent value in the A1:A100 range.
Microsoft Excel has a NOT function.
So, you would say
=NOT(A2="yourtest")
In this case, it means it returns true if A2 is not the string "your test"
I think that maybe your syntax for the criteria is not correct.
This formula works to exclude the string "A" from the summed results...
=SUMIF($A$1:$A$6,"<>A",$B$1:$B$6)
If you are trying to exclude "A" by referencing a cell that "A" is stored, this will not work. For example
=SUMIF($A$1:$A$6,"<>E1",$B$1:$B$6)
Here is a working example in excel:
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")
The blue cell summates to 1, but that is not correct and it should summate to more because of the row text match with B47 row. Any ideas what's wrong?
SUMIF is not supposed to work with more than one criteria (you can't check multiple criteria within one SUMIF as you tried in your formula).
This formula will calculate the right result for you: =SUM(B3:BI3*(IFERROR(MATCH(B2:BI3,B47:AL47,0)>0,0))), this is an array formula, so you need to press CTRL+SHIFT+ENTER after it.
MATCH(...): look for all students whether they are in the list with requirments (this is the part which works only as array formula)
IFERROR(...): converts #N/A errors to 0
If I am not wrong, you are trying to calculate the number of students for a particular project with skill1 and skill2.
You may also try using COUNTIFS() function. This works for multiple criteria.