SUMPRODUCT - return a row number - excel

I am trying to return the row number in which a sheet Column matches a value AND another column in that same sheet matches a value AND yet another column in that same4 sheet matches a value.
Here is some code:
=SUMPRODUCT((Data!C:C=Total!$A5)*(Data!A:A=Total!E35)*(Data!B:B=Total!F35)*(ROW(Data!C:C)-1))
Where Data!C:C is a column of dates and Total!$A5 is a cell with the same format type date
And Data!A:A is a column of unique text values and Total!E35 is a cell with a text value
AND Data!B:B is a column of unique text values and Total!E35 is a cell with a text value
There is only one match for the given combination I described.
I am stuck on the latter part of the formula, I believe. Where I multiply the ROW(Data! blah blah blah...
Can somebody help?!

If you want to return a row number MATCH might be better, i.e. this "array formula"
=MATCH(1,(Data!C:C=Total!$A5)*(Data!A:A=Total!E35)*(Data!B:B=Total!F35),0)
confirmed with CTRL+SHIFT+ENTER

Related

Excel formula to return value if two conditions are matched

I need a formula that can be pasted into cells B2:D5 in the sheet displayed in the image below. The formula should see if the value for the row in column A matches a color in row G and if the value for the column in row 1 matches a animal in row H. For all cells without a two part match it should return a blank "". If there is a two way match then it returns the numerical value in column I
Put this formula in B2, then copy across and down:
=IF(SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1)=0,"",SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1))

Get row index of the nth valid numeric value in a column

I have a spreadsheet with the column A2:A7 filled as:
A2=A4=A5=< blank>; A3=3; A6=a; A7=4;
How to get the row index of the second numeric value of the column A? In this case "6" (6th row from my data set that start in A2 and refers to A7).
In the same example, if I fill A2=0, the formula should return "2".
I need to use just Excel formulas, I can't use VBAs of macro codes.
Use this:
{=SMALL(IF(ISNUMBER($A$2:$A$7)*ROW($A$2:$A$7)=0,"",ROW($A$2:$A$7)),2)-1}
The 2 close to the end will determine if you interested in the nth smallest numeric value. In this case the 2nd.
Note that it's an array formula entered through CtrlShiftEnter

Excel formula match value in column A and return not blank cell column B

Need some help with creating a formula.
In column A I have text like "EAJ, ECJ, EDJ...", in column B there is text which I need to return, in this case "C1". However when I using vlookup of index/match getting blank cell by obvious reasons.
Is there any way to build a formula which will match text in column A and will return first not empty cell above in column B? For example if match text is in A322 then return value will be B318, because cells in range B322 up to B319 are blank.
Index/Match
You need to locate the last text in column B down to the row you locate ECJ in.
=INDEX(B:B, MATCH("zzz", B$1:INDEX(B:B, MATCH("ECJ", A:A, 0))))
Substitute "ECJ" for a cell on the worksheet cotaining ECJ or any other value to be matched in column A.

Right Function between SUMIFS or SUMIF function in Excel

I have some alphanumeric data in column A on sheet A. Something like this:-
abcd-1234
and so on and some value corresponding to every value in col B.
On another sheet i have 1234 means only the numeric part of this data on sheet B. Now i want to sum the data on col B on Sheet A with matching value in Sheet A. I have tried this so far:-
=SUMIFS(A!$A$1:$A$100,RIGHT(A!$B$2:$B$100,4),$A1)
But it is not working. Please help!!
Your explanation and your formula don't match. Let's assume column A has the alpha-numeric values and column B has the values you want to sum.
Try Sumproduct. Also when you extract the numbers from the text with the RIGHT() function, the result will still be text. If the value in A1 is a number, you need to coerce the extracted text into numbers.
=SUMPRODUCT(A!$B$1:$B$100*((RIGHT(A!$A$2:$A$100,4)+0)=$A1))

Excel vlookup return not available

i want to fill the name column using vlookup, here is my transaction table
and here is my master file
yes, they're the same number, but why do my vlookup doesn't return the corresponding name based on looked up value ?
does vlookup comply with data type ? like text, or number, or general ?
i have changing the data type, over and over, and return the same "Not Available"
is there anything wrong with my excel 2007 ?
You should use Index/Match like this:
=INDEX(Phonebook!$A$2:$A$45,MATCH(B2,Phonebook!$B$2:$B$45,0))
Your Vlookup doesn't work, because it tried to find value from B2 in first column of range Phonebook!$A$2:$B$45, i.e. Phonebook!$A$2:$A$45
What's wrong is that VLOOKUP is looking for the phone number in the first column, meaning in column A. For 'backwards lookup', you will need to use INDEX and MATCH:
=INDEX(Phonebook!$A$2:$A$45,MATCH(B2,Phonebook!$B$2:$B$45,0))
INDEX is as follows:
=INDEX(Range, Row Number, [Column Number])
It will return the value a cell from the range Range that is on the row number Row Number and column Column Number. I have put Column Number between square brackets because it is optional (you have only 1 column if you have a range that is within A:A for example)
To get the row number, you can use MATCH like the above. It works a bit like VLOOKUP, but instead of returning the value of the matching cell, it returns the row number of the matching cell (or column number if you use it on a horizontal range).
MATCH(B2,Phonebook!$B$2:$B$45,0) thus looks for B2 in the range B2:B45 of the worksheet Phonebook (0 stands for exact match) and gives the row number.
Then, you tell Excel to return the value of the cell from the range Phonebook!$A$2:$A$45 and row number obtained from MATCH.

Resources