Looking for a formula using the table below to bring in the correct credit value based on what the discount value and the product is - excel-formula

Looking for a formula using the table below to bring in the correct credit value based on what the discount value and the product is. For example I know for books with discountt value of .57 the credit (based on the table) should be 66.67% but how can I achieve it through formula? Any help would be greatly appreciate. Thank you!
After using the formula from #Scotts Answer:

Use INDEX with two MATCHES in the second criterion:
=INDEX(D:D,MATCH("Supplies",A:A,0)+MATCH(.57,$B$2:$B$8)-1)
This first finds the first instance of Supplies in Column A and returns that row number. Then it adds where it finds .57 in the first Min break down relatively then subtracts one.
So for this it finds Supplies in row 9 then it finds where .57 hits in the 3 cell in $B$2:$B$8. So the math is 9+3-1 which is 11 which would return row 11 in column D.

Related

Match on 2 cells and return value from 3rd cell (Excel 2013)

I have 2 worksheets.
SHEET1 has numbers from 1-31 across Row 1. It has a list of cars in Column A (Ford, VW...).
SHEET2 has a list of cars in Column A, the day of the month in Column B and the condition in Column C (New, Used or Wreck).
I need to make a match on the car and the day of the month and then retrieve the condition.
For example:
SHEET2 has one row that shows:
Ford 8 New
SHEET1 shows at the intersection of Ford and 8 - "New".
Any help to resolve this is appreciated. I have looked at VLOOKUP, INDEX and MATCH until I am blue in the face, but I can't figure this one out! I also looked through this site and couldn't find any similar scenarios.
Thanks in advance.
The below works (based on a scaled-down version I set up based on your data.
Array formula is: =IFERROR(OFFSET($C$8,MATCH($A2&B$1,$A$9:$A$12&$B$9:$B$12,0),0),"")
For array formulas to work be sure to press Ctrl + Shift + Enter instead of just Enter when exiting edit mode.

Index/match if greater than

Hoping someone can help me with my trouble with an index/match formula.
Column B has a list of names, column C has the frequency of an action taken (sales made) whilst column D has the average sales value.
I've created in column G a track of the 6 highest sales which has worked great:
=LARGE($D$8:$D$13, 2)
Then I've used column F to determine the name that matches each sales average:
=INDEX($B$8:$B$13, MATCH(G4, $D$8:$D$13, 0))
So far so good! However, I'd like to only include the sales average if that individual has had more than 3 sales. IE; the value in column C is >3.
Can any one provide help or suggestions please?
I think you could use a helper column to filter out the values you don't need before applying =LARGE() in the very beginning, like this:
=IF($C8>3, $D8, "")
Then do =LARGE() to this column instead:
=LARGE($X$8:$X$13, 2)
You could use an array formula:
=LARGE(IF(range=criteria,values),n)
so for your case:
=LARGE(IF($C$8:$C$13>3,$D$8:$D$13), 2)
press CTRL+SHIFT+ENTER to enter an array formula.

Formula returning Column A value for row containing MAX value of a range

Assume I have the following table:
A B C
1 Week 1 Week 2
2 Melissa 114.7 82.8
3 Mike 105.5 122.5
4 Andrew 102.3 87.5
5 Rich 105.3 65.2
The names are in column A, the Week values are in Row 1. (So A1 is blank, B1 = Week 1, and A2 = Melissa.)
I'm trying to build a formula that looks at all the values in a known range (in this example, B2:C5), chooses the highest value of the bunch (here, 122.5) and returns the name of the person from Column A that got that value. If I use this formula, it works for the values in range B2:B5:
=INDEX(A2:A5,MATCH(MAX(B2:B5),B2:B5,0))
That returns Melissa but if I expand the range to include more than just column B's values, I get an #N/A returned:
=INDEX(A2:A5,MATCH(MAX(B2:C5),B2:C5,0))
The weird part (to my simple brain) is that the MATCH portion of the formula works fine, if I just put in this formula, it returns the highest value of 122.5 from C3:
=MAX(B2:C5,B2:C5,0)
So clearly something it going wrong when I'm using either the MATCH or INDEX commands.
Hopefully this makes sense and someone can point out my error?
Try this:
=INDEX(A:A,MAX((B2:C5=MAX(B2:C5))*ROW(B2:C5)))
This is an array formula and must be confirmed with Ctrl+Shift+Enter.
Note: Match can only search one vector at a time. It can be one row or one column or one array. It cannot be two or more rows or columns or a 2D array.
Do it "twice"? Please try:
=INDEX(A2:A5,IFERROR(MATCH(MAX(B2:C5),B2:B5,0),MATCH(MAX(B2:C5),C2:C5,0)))
If you are going to have up to 52/53 weeks to cope with I'd suggest instead inserting a helper column with the MAX for each row. Make that an new (inserted) ColumnA (say =MAX(C2:BC2) etc.) and a simple VLOOKUP should serve, say:
=VLOOKUP(MAX(A:A),A:B,2,0)

Excel - Sum of values based on a drop down defining whether they are negative or positive

I've tried searching for posts specifically on this, but am struggling to find what I'm looking for. I'm trying to do some fairly basic calculations based on a value in a drop down field for each row which determines whether the value is negative or positive.
In the example below, I would like to sum all the values in Column B based on a drop down value (Column C) which defines whether the value in column be should be added or subtracted from the total amount in C10.
I'll be honest, I have no idea how to even begin working out how to write the formula for the Credit/Debit values based on the drop down.
A B C D
1 DATE VALUE TYPE DESCRIPTION
---- ----- ---- -----------
2 02/03/2015 £150 Debit Currency Exchange
3 20/04/2015 £200 Debit Currency Exchange
4 04/05/2015 £1000 Credit Currency Exchange
5
6
7
8
9
10 TOTAL ADJUSTMENTS: £650
I'm guessing I need to somehow use the SUMIF statement to define whether the type in Column C is Debit or Credit and then add/substract the corresponding value some how from the total amount?
Many thanks in advance for any assistance you may be able to offer.
Try
=SUMIF(C2:C9,"Credit",B2:B9)-SUMIF(C2:C9,"Debit",B2:B9)
The first Sumif sums up all the credits, the second Sumif sums up all the debits and the debit sum is then subtracted from the credit sum.

Excel match and index to select value with 2 column and 1 row criteria

I'm trying to write a formula that can return a cell value using INDEX and MATCH but I can't make it work. I have the following setup:
year person pet friend sale
1 jeff scout matt computer
1 carole riley tom mouse
2 jeff sadi trung computer
2 carole daisy ellen mouse
Say I have three cells:
year 2
col person
sale mouse
RESULT: carole [year = 2, sale = mouse, column value from 'person']
Is there a way I can use index and match to zero in on the specific cell? I will always have a year and sale provided. However, the column (person, pet, or friend) will change so I need to find the value in that particular column where the year and mouse match the cells.
Once I get a formula to work I'm going to write a more general function, but I need help getting the INDEX/MATCH combo to work properly.
You could use a combination of Index and sumProduct:
=INDEX(Table1[[person]:[friend]],SUMPRODUCT(--(Table1[year]=J1)*--(Table1[sale]=J2)*ROW(Table1[[#Data],[year]]))-1,MATCH(J3,{"person","pet","friend"},0))
This would work as i
n the following example:
So J1 contains the year to look up, J2 contains the Sale name, and J3 is the column you want to return a value from.
Another option would to add a concatenated column to your table the has the values of year and sale:
you would then change the formula to:
=INDEX(Table1[[person]:[friend]],MATCH(K1&K2,Table1[Year&Sale],0),MATCH(K3,{"person","pet","friend"},0))
slightly shorter and defiantly faster.
NOTE: This might not work with versions of excel below 2010, if you are running an older version I can supply a modified answer.

Resources