I have a data table, where I need to be able to search multiple criteria and return the header value.
I have table of SKUs and Dates, and the inventory at each date. See example below. I want to be able to select a SKU Number, and a Date, and return the first instance where the date is greater than the date provided, and the inventory level is greater than zero.
See example below. I would want to see SKU 2, with input date of 4/4/2020. The first date with SKU 2 with a inventory greater than 0 after 4/4/2020 would be 4/6/2020. That is the example output I am looking for.
Any help would be greatly appreciated!
Use:
=INDEX(4:4,AGGREGATE(15,7,COLUMN(D4:G4)/((D4:G4>=J6)*(INDEX(D:G,MATCH(J5,C:C,0),0)>0)),1))
Or, J8 formula :
=AGGREGATE(15,6,D4:G4/(INDEX(D5:G9,MATCH(J4,C5:C9,0),0)>0+RIGHT(J6))/(D4:G4>=J5),1)
Related
I am looking to do a match index with a double criteria > but i want to return the results of the cell above the results.
e.g.
Two tables
Table A is the reference point and i want to reference the Invoice Number and Product Description from Table A - find them in Table B, but i want to return the Invoice number in the above cell from table B.
if i used Invoice number 987600/Product 1 from table A as an example.
The look up would find Invoice Number 9876008, find Product 1, then return invoice numerb 608034 (As it is the one above 9876008) in table B
Thank you in advance
Use AGGREGATE:
INDEX(TABLE2!C:C,AGGREGATE(15,7,(ROW(TABLE2!$C$2:$C$100)-1)/((TABLE2!$C$2:$C$100=9876008)*(TABLE2!$F$2:$F$100="Product 1")),1))
I have a list of data with 200k plus lines. I need to search for the next order date before a certain date, that matches an ID number in excel. I know I can use index match to find the next date before a given date, but how would I do that when I need the ID numbers to match a given ID? I have attached a sample format of my data I am searching in. The problem is also that I am not search by a range of dates, I need the next date before a certain date. There are multiple dates before a given date, I need to just pull the one before.
Index match formula to find the next given date.
=INDEX(Orders!B:B, MATCH(MIN(ABS(Orders!B:B-F3)), ABS(Orders!B:B-F3), 0))
ID Date
1 7/22/2015
2 4/27/2016
3 7/6/2016
2 4/23/2016
Another way to state your requirement is to find the maximal date in B:B that is < F3 and has in A:A the ID specified in E3. This is exactly what the following formula does:
=AGGREGATE(14,6,Orders!B2:B999/(Orders!B2:B999<F3)/(Orders!A2:A999=E3),1)
AGGREGATE(14, ...., 1) get the max result in the given array
The divisions by the criteria will generate DIV!0 in the array entries that don't match the criteria
Parameter 6 instructs the function to ignore the error entries, including those divisions by 0
Notice that although this formula does not require CSE, it is array-based, so avoid using full-columns because they slow-it down. Choose a reasonable number of rows (i.e. A2:A999) that is sufficient to span your data.
I have a list of product codes and product SKUs and need to find partial matches. The problem is all the data is out of order.
I have provided a subset of data done manually
Master SKU Product Code Corresponding Product SKU
1_100049 1000510 1_1000510
1_1000510 1000511 1_1000511
1_1000511 100052 4_100052
1_100052 1000525 N/A
1_100053 100053 2_100053
1_100054 100054 1_100054
1_1000560 1000540 N/A
1_1000570 100055 N/A
1_1000575 1000560 1_1000560
1_100060 1000570 1_1000570
1_1000600 1000575 6_1000575
1_100061 100060 3_100060
1_1000620 1000600 1_1000600
I need to find the Product SKU corresponding to the product code. Is there anyway to just list the match in column C? (The data is just in in two columns A and B)
The formula I have is
=VLOOKUP(A2,B$2:B$6000,3,"TRUE")
You can use INDEX/MATCH on a modified Master-SKU column with an array formula
=INDEX(A2:A10,MATCH(B2,RIGHT(A2:A10,LEN(B2)),0))
Use Ctrl-Shift-Enter when you insert the formula. If your columns contain numbers instead of text, you might have to add VALUE
=INDEX(A2:A10,MATCH(B2,VALUE(RIGHT(A2:A10,LEN(B2))),0))
This VLOOKUP may work for you. Adjust the lookup range to your data:
=VLOOKUP(RIGHT(A2,LEN(A2)-2),$B$2:$B$2,1,0)
I have two tables (1.Purchase order and 2.The invoice) and I want to spread the quantity from the invoice table to the purchase order invoice quantity column by code but I want to match the exact quantity from the purchase order quantity.
Here is how the table looks now:
Purchase order table and Invoice table
And this is how i want it to look:
In this post a formula was suggested
=MAX(MIN(M$2-SUM(E$1:E1), D2), 0)
which I customized to use vlookup so it can match the code,
=MAX(MIN(VLOOKUP(A2,J:M,4,FALSE)-SUM(E$1:E1), D2), 0)
but that doesn't work.
#Jeeped suggested to use AGGREGATE function for a one column conditional match, but can anyone give me an example related to this situation?
Here is the sample Excel file
Thank you!
In E2 as,
=MAX(MIN(VLOOKUP(A2, J:N, 4, FALSE)-SUMIFS(E$1:E1, A$1:A1, A2), D2), 0)
What happened to row 1?
I have data with the entities date, name, price. I managed to get distinct categories in the Categories colume for each name with = LEFT(B2;FIND(" ";B2)). In fact I want to get for each categorie the summed up monthly prices per month.
My sheet:
I tried:
=SUMIF(B2:B6;LEFT(B2;FIND(" ";B2));C2:C6)
However, this formula returns 0 and also does not give me the prices per categorie and per month.
I really appreciate your help!!!
If you want a sum on each row which will sum for the category of the current row and the month of the current row you can use SUMIFS like this
=SUMIFS(C:C;E:E;E2;A:A;">"&EOMONTH(A2;-1);A:A;"<="&EOMONTH(A2;0))
SUMIFS requires Excel 2007 or later
=SUMIF(E:E,E2,C:C) will sum the categories for you
I think if you want to sum categories by date, you might want to use a Pivot Table or write a Macro
You can write a =sumif function with multiple criteria but I'm not sure how you would define the "date rage" for each new criteria