Index Match & SumIfs formula giving error - excel-formula

I am getting a #Ref error while using sumif and index match formula for below tables.
All I am trying to do here is to sum total hours for a particular employee who worked on multiple projects for a specific period.
For below example for Shafil Buksh, it should return 26 hours but instead I get an error.
Can you please suggest the correction to this formula or if I should use completely different formula to get the result?
Thank you in advance!

Related

How to workaround average function in excel?

I've taken an online excel course and stuck at one of the exercise for average function.
In the image, the average function is showing error div/0
Note that TAX column values have been calculated by formula. Is that the reason for this error? I tried searching online but could not get any proper answers... can anyone please help? Thank you.
Formula applied in tax column =IF(AND(C2 < 100), "50","100")

Not sure how to do this countifs function correctly

I have this table below
What I want is able to pivot for number of items(column) ordered by days (row). I'm not sure how to do it smartly. So I thought of a way which is to create a table below
However, when I tried writing a countifs, it gives me error. What I tried for each row was:
=countifs(range of item 1 to item 3, that item, range of the whole Order Date column, that date). But it throws me an #VALUE error. More details below
So yeah, I'm stuck. Can someone please help? I'm using Excel 2019 by the way
For COUNTIFS function each additional range must have the same number of rows and columns as first range.
But I can suggest the SUMPRODUCT function:
=SUMPRODUCT(([#Item]=Table1[[Item 1]:[Item 3]])*([#Date]=Table1[Order Date]))

Ranking formula in excel based on two columns

I'm trying to rank the following items based on price using the following formula =SUMPRODUCT(([Item]=[#Item])*([#Price]<[Price]))+1, but it isn't returning any results:
When I use the same formula in the following test table it works, =SUMPRODUCT(($A$2:$A$7=A2)*(B2<$B$2:$B$7))+1:
Can someone please let me know what I am doing wrong? Thanks
EDIT 2 : Evaluation https://imgur.com/a/eXIYPAP
Your formula works fine for me.
Are you sure that A2 and A3 are the same value? There may be some hidden white space causing problems. Just try
=A2=A3
in another cell to make sure they are the same.
USE COUNTIFS INSTEAD
I don't know why your formula isn't working, however, I would suggest avoiding SUMPRODUCT where you can.
=COUNTIFS([Item],[#Item],[Price],">"&[#Price])+1
This will count the number of prices higher than the current one for each item (+1, if you want the rank to start at 1 instead of 0)
If your goal is to get the ranking for each unique item, =SUMPRODUCT(([Item]=[#Item])*([Price]>[#Price]))+1 should do the trick. If the goal is to get the ranking based only on price, don't have it figured out yet.

SUMPRODUCT with Dates for Criteria

I am trying to obtain an average of an array of fields with the following simple formula
=SUMPRODUCT(Main!BA:BA, Main!CY:CY, --(Main!D:D >=D3, Main!D:D <=E3))
I'm getting a #DIV/0! error. I have no clue why it's dividing anything. Please help!
Basically, how can I get the sum product of columns D vs E between the dates 11/05 to 11/27.
You need to use * or + depending on whether you want AND or OR.
=SUMPRODUCT(Main!BA:BA, Main!CY:CY, (Main!D:D >=D3)*(Main!D:D <=E3))
One more note:
You want to limit the references to only that with data as this formula will do a lot of unneeded calculations.
From looking at your worksheet, you want this:
=SUMPRODUCT(D:D*E:E*(C:C>=$C$27)*(C:C<=$C$49))

Using Sumproduct with ranges and cell references

I am attempting to use sumproduct in replace of sumifs so I can use multiple criteria within a single range. What works so far is:
=SUMPRODUCT(Table2[Sum of MKTValue],--ISNUMBER(MATCH(Table2[Code],{"EG1","EG2"},0)),--ISNUMBER(MATCH(Table2[Currency],{"GBP","USD","EUR"},0)),(Table2[Final Date]=INDIRECT("J"&SUM(ROW()-102)))*1)
However I need the "J" column reference, when I attempt to drive this using the current column as below:
=SUMPRODUCT(Table2[Sum of MKTValue],--ISNUMBER(MATCH(Table2[Code],{"EG1","EG2"},0)),--ISNUMBER(MATCH(Table2[Currency],{"GBP","USD","EUR"},0)),(Table2[Final Date]=INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","")&SUM(ROW()-102)))*1)
Then I am getting a #VALUE error. I have tried a number of different varieties of the above but I cannot get it to work.
Thanks for your help.
I assume that Jn contains a valid date - try moving the SUM function to outside INDIRECT, i.e. with last criterion
(Table2[Final Date]=SUM(INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","")&ROW()-102))*1

Resources