MINIFS on several columns with blanc cells - excel

I'm trying to apply MINIFS formula on 2 columns. Moreover, these columns can contain blank.
D2 =MINIFS(B:C;A:A;A2;B:C;"<>")
Data
ID | Date 1 | Date 2
1 | 02/05/2020 |
1 | | 10/08/2021
2 | | 20/02/2021
3 | 01/12/2019 | 10/12/2019
3 | 10/12/2019 |
3 | | 19/07/2020
Expected Result
ID | Date 1 | Date 2 | Result
1 | 02/05/2020 | | 02/05/2020
1 | | 10/08/2021 | 02/05/2020
2 | | 20/02/2021 | 20/02/2021
3 | 01/12/2019 | 10/12/2019 | 01/12/2019
3 | 10/12/2019 | | 01/12/2019
3 | | 19/07/2020 | 01/12/2019
However, it is returning #VALUE!
Can you please explain me why? MINIFS doesnt support blank cells ?
Thank you

You cannot use different size ranges in MINIFS. So trying to use B:C with A:A will error.
I would use MIN with FILTER:
=MIN(FILTER(B:C,A:A=A2,""))

Related

Count adyacent non-blank cells in Excel/Google Sheets

I have an Excel/Google Sheets table in which some rows contain blank cells in between non-blank cells. I would like to count from left to right. I have used the formula COUNTA(A2:F2) but it cannot achieve what I want. This is a sample of the outcome I would like to get, with the Personalized count that I am seeking to achieve and the classic COUNTA:
I think that the task is slightly different from what you describe in the question, you want to count until blank and not between not blank cells.
So I made this working example
+---+------+------+------+------+------+------+-------+
| | A | B | C | D | E | F | G |
+---+------+------+------+------+------+------+-------+
| 1 | 2021 | 2020 | 2019 | 2018 | 2017 | 2016 | Count |
| 2 | 1 | 1 | 1 | 1 | 1 | 1 | 6 |
| 3 | 1 | 1 | 1 | 1 | | | 4 |
| 4 | 1 | | 1 | 1 | 1 | 1 | 1 |
| 5 | 1 | 1 | 1 | | | 1 | 3 |
+---+------+------+------+------+------+------+-------+
where cell G2 contains the following:
=IFERROR(MATCH(1;--(A2:F2="");0)-1;COUNTA(A2:F2))
is it right for you?

Check if there is at least one not-unquie value in column (without using a helper column)

| A | B |
--|---------------|--------------------|----
1 | Product | Check Unique |
--|---------------|--------------------|----
2 | Product_A | yes |
3 | Product_B | |
4 | Product_B | |
5 | Product_C | |
6 | Product_D | |
7 | | |
In Cell B2 I want to have a formula that is doing the following:
= If there is at least one value in Column A that is not unique then "yes" else "no"
I know I could achieve this with a Helper Column using COUNTIF but I would prefer a solution without a Helper Column.
Do you have any idea if this is possible?
Use COUNTIF:
=IF(OR(COUNTIF(A2:A6,A2:A6)>1),"Yes","No")
in pre-O365 formula should be entered as array formula

How to divide two cells based on match?

In a table 1, I have,
+---+---+----+
| | A | B |
+---+---+----+
| 1 | A | 30 |
| 2 | B | 20 |
| 3 | C | 15 |
+---+---+----+
On table 2, I have
+---+---+---+----+
| | A | B | C |
+---+---+---+----+
| 1 | A | 2 | 15 |
| 2 | A | 5 | 6 |
| 3 | B | 4 | 5 |
+---+---+---+----+
I want the number in second column to divide the number in table 1, based on match, and the result in third column.
The number present in the bracket is the result needed. What is the formula that I must apply in third column in table 2?
Please help me on this.
Thanks in advance
You can use a vlookup() formula to go get the dividend. (assuming table 1 is on Sheet1 and table 2 in Sheet2 where we are doing this formula):
=VLOOKUP(A1,Sheet1!A:B, 2, FALSE)/Sheet2!B1
Since you mention table, with structured references, though it seems you are not applying those here:
=VLOOKUP([#Column1],Table1[#All],2,0)/[#Column2]

Excel to return list of items with specific repetition

I am trying to create a list of names that repeat a specific number of times, based on another variable. Basically, if I have the following:
Column A Column B
Amy 5
John 2
Carl 3
the result would be:
Amy
Amy
Amy
Amy
Amy
Carl
Carl
Carl
John
John
I have built the initial list using the Index-Small-Countif, method, to get an alphabetical and distinct list, and then another formula to determine how many times each item repeats. I know I need to use some sort of index/offset with reference to rows, but just can't quite get it to work out.
The list is dynamic and changes daily, so manually retyping the list each day would result in too much human error and time (list is about 50 distinct items, with total number of rows at the end being around 400). Ultimately, the list will be used for a number of sumproduct/vlookups.
I can do this fairly quickly in VBA, but the users of this document don't always trust VBA and trying to get them to Enable Macros each time is not something that is going to work.
Thank you very much for any help you can offer!
Based on your table:
+---+------+---+
| | A | B |
+---+------+---+
| 1 | Amy | 5 |
| 2 | John | 2 |
| 3 | Carl | 3 |
+---+------+---+
In column C stick a "0" at C4 and formula =B1+C2 copying down to just before the 0:
+---+------+---+----+
| | A | B | C |
+---+------+---+----+
| 1 | Amy | 5 | 10 |
| 2 | John | 2 | 5 |
| 3 | Carl | 3 | 3 |
| 4 | | | 0 |
+---+------+---+----+
Now we have an upper bound of the row that each value should be placed on which we can use in a Match() formula which will feed an Index() formula.
In a new column (I'm using E) IN E1: =INDEX($A$1:$A$3,MATCH(ROW(),$C$1:$C$3,-1),1) and copy down
+----+------+---+----+--+------+
| | A | B | C | D | E |
+----+------+---+----+--+------+
| 1 | Amy | 5 | 10 | | Carl |
| 2 | John | 2 | 5 | | Carl |
| 3 | Carl | 3 | 3 | | Carl |
| 4 | | | 0 | | John |
| 5 | | | | | John |
| 6 | | | | | Amy |
| 7 | | | | | Amy |
| 8 | | | | | Amy |
| 9 | | | | | Amy |
| 10 | | | | | Amy |
+----+------+---+----+--+------+
The list is backwards because of that oddball backwards from 0 thing we did in Column C. This is to make that Match() last parameter of -1 (Greater than) work correctly.
I would imagine with some tweaking this could be done a little cleaner, but this should get you in the ballpark.
Although I would still be a big proponent of finding users who are capable of enabling macros. Ugh.

Transform values without VBA but with Index and Match

I'm trying to find a solution without macros in excel for following problem:
There is a table containing ratings of a student for different time periods.
So the rating of the student with ID=1 was 1 from January to April and 3 from Mai to June.
Two other students had a constant ranking (6 and 9) from January to June
| A | B | C |D |
---| ----|------------|------------|-------|
1 | ID | START | END |RANKING|
2 | 1 | 01.01.2014 | 30.04.2014 | 1 |
3 | 1 | 01.05.2014 | 30.06.2014 | 3 |
4 | 2 | 01.01.2014 | 30.06.2014 | 6 |
5 | 3 | 01.01.2014 | 30.06.2014 | 9 |
Next table contains IDs (y axis) and Months (x axis)
| F | G | H | I | J | K | L |
---| ----|--------|--------|--------|--------|--------|--------|
1 | ID | 201401 | 201402 | 201403 | 201404 | 201405 | 201406 |
2 | 1 | | | | | | |
3 | 2 | | | | | | |
4 | 3 | | | | | | |
And I wish to feel this second table like this:
| ID | 201401 | 201402 | 201403 | 201404 | 201405 | 201406 |
| ----|--------|--------|--------|--------|--------|--------|
| 1 | 1 | 1 | 1 | 1 | 3 | 3 |
| 2 | 6 | 6 | 6 | 6 | 6 | 6 |
| 3 | 9 | 9 | 9 | 9 | 9 | 9 |
I tried to use Index and Match, but without any good results because I haven't found a posibility to use IF (if (
Could anybody help?
You can get what you're looking for with SUMPRODUCT
Given the layout you provided, this formula should work when put in G2 and filled down and over
=SUMPRODUCT(--($A:$A=$F2),--($B:$B<=G$1),--($C:$C>G$1),$D:$D)
That looks in column A for an ID matching F2, then for every one it finds of those:
It checks the date in column B against the date in G1
It checks the date in column C against the date in G1
If all criteria match, it returns the value in Column D
This assumes you only have one entry for each period, otherwise it will sum them.
Also, you can use SUMIFS, it's a little less easy to read but I think it's slightly more efficient than SUMPRODUCT (I'm not positive, just anecdotal evidence from usage)
=SUMIFS($D:$D,$A:$A,"="&$F3,$B:$B,"<="&G$1,$C:$C,">"&G$1)
It does the exact same thing, just with different syntax.

Resources