How to add the year to a trim in a dynamic table - excel-formula

Hi, I wanna concatenate in the result of my formula into the last cell in the rigth "Trim.2" the year of the trim found in the dynamic table. The formula is a vlookup of the lowest "Rentabilidad" (Revenue). So I need the result as "Trim.2 2016" not only the trim.
Regards

Although it is not a very elegant solution, the following should work:
=LET(
values,$F$4:$F$13,
items,$E$4:$E$13,
min,MIN(values),
match,MATCH(min,values,0),
items_reordered,INDEX(OFFSET(items,0,0,match),SEQUENCE(match,1,match,-1)),
item,INDEX(items,match),
year,INDEX(items_reordered,MATCH(TRUE,ISNUMBER(items_reordered),0)),
item&" "&year
)
which gives the result as shown here:
You will only have to adjust the cell references for the variables 'values' and 'items' within the LET() function

Related

Excel concatenate function with multiple conditions

I have the following in my first 3 columns of my sheet in excel:
Results table. C3 is where I want the concatenation done
I also have the following table:
Now I am trying to use concatenate to retrieve the items from table 69 using the following conditions:
Spec = the value in B1 (Yellow in first photo)
Slot = each of the values in column A (A2:A18)
this is the formula I have in C2:
=CONCATENATE(IF(AND(Table69[Spec]=$B$1;Table69[Slot]=A2);Table69[Item];"")& ",")
Can anybody help me with this as this formula for the moment is returning as if there was no values?
Try using commas instead of semicolons. Once you do that your formula should return "Icon of the Silver Crescent,".
As a side note, the ampersand "&" sign will do the same thing as the concatenate formula. You are adding a comma at the end of your function.
I found an answer using Text join.
Thank you all that took the time.
=TEXTJOIN(", ";TRUE;IF((Table69[Spec]=$B$1)*(Table69[Slot]=A2);Table69[Item];""))

VLookup with multiple results adding values

I would like to lookup a value in another excel file that will have multiple results as rows. For example If the specific value is found in the column A of that row I want to add the number in column c to a total and then output that.
Book 1 VLookup from this sheet :
Book 2 Vlookup destination:
Desired Result:
I would normally add what I have tried, but im completely stumped, the only real formula ive tried is a standard VLookup. The Watered down question is "Need to know: how many sales per unique sku?"
As #BigBen suggested in the comment, use =SUMIF() formula.
in a pseudocode: =SUMIF(range_to_check, product_name, sales_amount_range)
So with the following data:
The formula in E1 which you can drag to other cells in the column would look like:
=SUMIF(A1:A6, D1, B1:B6)

empty string value if there is no date inside range

I have following formula which i add as a picture here in the question as well.
=MIN(INDIRECT(ADDRESS(ROW(AF4);COLUMN(AF4))&":af"& (MIN(IF(A4:A108="";ROW(A4:A108))))))
AF3 and AG3 columns should calculate the minimum date in dynamic range(based on empty cell in A). As you can see in AF, if all values are "N/A" formula brings automatically 00.01.1900 by default. I want it to return empty string if the range does not contain any date. If it has a date inside the range, the formula should work as it works in AG3.
How can i do this?
Wrap the formula in IF like below and test:
=IF(MIN(AF4:INDEX(AF:AF,MIN(IF(A4:A108="",ROW(A4:A108)))))=0,"",MIN(AF4:INDEX(AF:AF,MIN(IF(A4:A108="",ROW(A4:A108))))))
I have dropped INDIRECT which is volatile. Above construct is less volatile.
It is ARRAY formula so you need to CTRL+SHIFT+ENTER.
Make sure you replace "," with ";" in formula arguments at your end.
You could follow #shrivallabha redij's suggestion of a custom format or use a TEXT statement like this
=TEXT(MIN(INDIRECT(ADDRESS(ROW(AF4),COLUMN(AF4))&":af"& (MIN(IF(A4:A108="",ROW(A4:A108)))))),"dd.mm.yyyy;;")
EDIT
I agree with #shrivallabha's advice to use Index instead of Indirect. If I was doing this from scratch, I would also use Aggregate:
=IFERROR(AGGREGATE(15,6,AF4:INDEX(AF4:AF108,AGGREGATE(15,6,ROW(A4:A108)/(A4:A108=""),1)),1),"")

Excel: find the Max of an array with same names

I have searched the Net and tried multiple solution which never worked. You are my last hope.
I have a table like that:
NAMES.......... VALUES
A...........................4
A...........................1
B...........................4
B...........................3
B...........................2
B...........................1
C...........................4
C...........................3
As you can see, the first column has names only where the second one values.
Both Names and Values often repeat them self.
The idea is to TAG the names (first column) with the MIN value taken from the second column.
So the correct result should be:
NAMES.......... VALUES
A...........................1
B...........................1
C...........................3
I am trying to do that through Excel using the INDEX+Match formula where I am trying to add a MIN formula without success:
=MIN(INDEX($D$25:$D$36,MATCH(C25,$C$25:$C$36,0),1))
I have put the MIN everywhere but none seems to work. Which is the correct syntax and if this is not the right solution, which formula might do the job?
Thank you for your time and help
With data in column A and B, in C1 through C3 enter:ABC then in D1 enter the array formula:
=MIN(IF(A$1:A$100=C1,B$1:B$100,""))
and copy down:
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key. If this is done correctly, the formula will appear with curly braces around it in the Formula Bar.
If the data never changes, a Pivot Table is easier to implement.
Two non-array alternatives.
With the newer MINIFS function.
=minifs(d:d, c:c, c25)
Using INDEX in its array format but entered as a standard formula,
=min(index((d$25:d$36)+(c$25:c$36<>c25)*1e99, , ))

Excel SUM and IF combine help

I have two columns of numbers. Both are 1 to 5. I want to count all the cells where the left column value equals the right column value AND the left column value equals a certain value.
I tried this:
=SUM(IF(W2:W13=X2:X13 AND W2:W13=4,1,0))
I've tried pressing Ctrl+Shift+Enter and it adds {} around the formula but that didn't help either.
I think it's the W2:W13 = 4 part that doesn't work
=COUNTIFS(W2:W13,"=4", X2:X13, "=4")
You can use the sumif() function:
SumIf( range, criteria, sum_range )
it will apply the criteria for each row in the range.
Edit: to count the matches, you can use sum_range = 1 or use the Countif() function suggested by Ben in his answer
Have you considered a third column (C) with the formula IF(A1=B1,1,0) and then summing that third column?
I'm not much of an Excel Expert, but didn't they craeted the COUNTIF(range, criteria) function for this?
Add a third column eg Z2:Z13 with this formula: IF(AND(W2=X2; W2=4); 1; 0)
Then sum that one.
I don't have Excel 2007. So here's how you can do it in Excel 2003:
=COUNT(IF((W2:W14=4)*(X2:X14=4),Y2:Y14))
Since you are looking for a specific value and the column next to it to be the same value, you can just compare both columns to the same value.
The trick to get this to work is after entering the formula you need to hit F2 to go into edit mode and then hit CTRL-SHIFT-ENTER which makes this formula an array formula. This will put {} around the entire formula. Without making this an array formula this formula won't work.
I found this information in the Excel help document titled Count how often a value occurs

Resources