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

| 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

Related

Excel - COUNTIF(s) & SUMPRODUCT

I'm trying to count clusters of values in one column but only if a value in another column is above a certain value.
I started with the below code to count how many unique clusters were in a column.
=SUMPRODUCT(1/COUNTIF(B1:B10,B1:B10))
| A | B |
| -------- | -------------- |
| 50 | 1 |
| 200 | 1 |
| 190 | 2 |
| 10 | 5 |
| 100 | 1 |
| 70 | 5 |
| 130 | 2 |
| 10 | 5 |
This would return a value of 3 as there are 3 unique clusters (1,2,5)
However, I am wanting to add a dependacy based on column A. Only count clusters in B if A>100. As there are no values of 5 in column B where A>100, the cluster count in B would be 2.
Any help to achieve the above would be very much appreciated!!
For any version:
=COUNT(1/(FREQUENCY(IF(A1:A8>100,B1:B8),B1:B8)))
array entered (with Ctrl+Shift+Enter) if non-365. If you have 365 use JvdV's answer. :)
With Microsoft365:
=COUNT(UNIQUE(FILTER(B1:B8,A1:A8>100,"")))
With older versions:
=SUMPRODUCT((A1:A8>100)*IFERROR(1/COUNTIFS(A1:A8,">100",B1:B8,B1:B8),0))

MINIFS on several columns with blanc cells

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,""))

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]

Create Distinct ID by Group in Excel without sorting

I have an Excel column that cannot be sorted and for which I need to create a unique id by group, similar to what is below:
+--------+------+
| Name | ID |
+--------+------+
| Jim | 1 |
| Sarah | 1 |
| Tim | 1 |
| Jim | 2 |
| Rachel | 1 |
| Sarah | 2 |
| Jim | 3 |
| Sarah | 3 |
| Rachel | 2 |
| Tim | 2 |
+--------+------+
You can do this with a simple COUNTIF() and getting a little creative with your cell references:
=COUNTIF($A$1:$A1, A2) + 1
Put that in B2 (assuming your list with headers starts in A1) and then copy down.
COUNTIF() here is counting the number of times the name in the adjacent cell has appears in all of the cells above it. As you copy it down, that range will grow to include all cells between A1 and the next row up.

Kind of group by in Excel without VBA

I need another transformation help in Excel
| A | B |
---| ----|--------|
1 | ID | Course |
2 | 1 | A1 |
3 | 1 | A2 |
4 | 2 | A1 |
5 | 3 | A2 |
I want to have a kind of group by, i.e.
| A | B | C |D | ...
---| ----|---------|---------|---------|----
1 | ID | Course1 | Course2 | Course3 | ...
2 | 1 | A1 | A2 | | ...
3 | 2 | A1 | | | ...
4 | 3 | A2 | | | ...
Any ideas? Is it possible without VBA macro?
I believe that the following link on removing duplicates from column would suit your needs (in your case you would do it horizontally).
http://www.get-digital-help.com/2009/03/30/how-to-extract-a-unique-list-and-the-duplicates-in-excel-from-one-column/
Per your reply to Robert, if you want to do it without VBA, try this... Select all cells in the first column. Copy and paste them into the first column of another worksheet. Use Excel's Remove Duplicates function on the pasted data. Then use INDEX functions in the columns to the right in order to pull the first, second, etc values matching that first column value.

Resources