Function For Unique Values In Array?

Oct 4, 2011

I have an array called "Universe", which have duplicated values. I am trying to write a code that gives me an array which have only unique values.

View 9 Replies


ADVERTISEMENT

Add Unique Values Into An Array

May 14, 2007

I have a list of data in a range on an Excel worksheet.

I want to create a macro that searches the range e.g. $A$1:$A$10 and identifies the unique cell values into an array.

So if range data = "A,B,B,C,C,D,D,D,E" I would end up with an array containing 5 items "A,B,C,D,E".

I would then like to cycle through each array item and bring up a message box displaying the value of each array item.

View 9 Replies View Related

Unique Values From Range Into Array

Jan 12, 2012

I have a spreadsheet that within Range(E2:H800) there are a number of different text/string values and blanks.

Using a Macro, how can I quickly fill a variable with each of the unique (non-blank) variables?

View 7 Replies View Related

Array Of Only Unique Column Values

Aug 13, 2007

I need to capture a list of unique usernames appearing in a column on the sheet, and also the number of times each user has a desired value occur for their row (an error). The number of users and the names of the users will change from one sheet to the next making a static solution unworkable. The user names will be unsorted in the column.

My first reflex is to use an array, and an associative array if possible would allow me to reference the user by name, instead of a clumsier index number and iterating through a loop to verify if the user is already stored in the array. I don't know if it's possible in VBS though. I'll add any new users names to this array if they aren't already in there.

View 9 Replies View Related

Store Unique Filter Values Into An Array

Jan 21, 2009

In an excel i have 3 columns they it contains around 12000 records

Group FA Title
A S1 bbbb
A M1 xxxx
A M2 eeeee
A S1 ffffff
A S1 pppp
A M3 aaaaa
A M2 ooooo
A M2 qqqq
A M1 ttttt

Here i need to get the unique FA, so i filter the column FA, my question is, After filter with FA column ,is there any way to store these unique FA(ie S1,M1,M2,M3) into an array using vba?

View 9 Replies View Related

Count Unique Values With Multiple Conditions Array Method

Apr 28, 2014

I need to modify the underneath Count Array Formula to count unique values based on multiple conditions. I can get the formulas to work with NUMERIC values in Column A in the N1 & N2 tabs. However, I cannot get the formula to work when column A contains TEXT values in the TX1 & TX2 tabs.

I've attached the XL file for your review of the project.

=SUM(IF(FREQUENCY(IF(('TX1'!$B$2:$B$15=B2)*('TX1'!$C$2:$C$15=C2)*('TX1'!$D$2:$D$15=D2),MATCH('TX1'!$A$2:$A$15,'TX1'!$A$2:$A$15,0)),MATCH('TX1'!$A$2:$A$15,'TX1'!$A$2:$A$15,0))>0,1))

View 4 Replies View Related

Counting Unique Values With A Function

Feb 16, 2006

I have a column of data with 1000 rows. In this column there are duplicated values. I would like to be able to use a function count how many unique values are in the column. Let's say there were 4 duplicates of 250 values in the column. I would like to be able to write a function to calculate the 250. I am very familiar with Excel and am able to acheive the number through subtotals and/or pivot tables. I know I can find how many instances one specific value appears in the column through sumproduct and/or countif statements,

View 14 Replies View Related

Function For Counting Unique Values?

Jan 31, 2013

what function can I use to count the number of unique values in a range of cells?

View 4 Replies View Related

VLookup Function - Copy Values Corresponding To Unique Identifier From One Sheet To Another

Jul 8, 2014

I would like to copy values corresponding to a unique identifier from one sheet to another, using the vlookup function. The problem is that after a certain cell the values are given as N/A even though they are present in the sheet I want to copy them from.

View 3 Replies View Related

Obtain The Array Values Of A Function

Jan 25, 2013

How can I obtain the array values from a function?

For example: Those steps were made by cytop to split a text (btw it works perfecet!!), I just added Function splitText(strSplit As Variant) As Variant ... End Function

VB:
Function splitText(strSplit As Variant) As Variant
Dim datosColumnaIncio() As Variant
Dim iTemp As Integer
Redim datosColumnaIncio(Len(strSplit) - 1)
For iTemp = 1 To Len(strSplit)
datosColumnaIncio(iTemp - 1) = Mid$(strSplit, iTemp, 1)
Next
End Function

So I want to know if its correct like that:

VB:
Function splitText(strSplit As Variant) As Variant
Dim datosColumnaIncio() As Variant
Dim iTemp As Integer

[Code] .....

So when I call the function:

VB : MsgBox splitText("F4")

It throws an error message :s what is wrong or how can I get the array values of a function ???

View 2 Replies View Related

Function / Formula In Excel To Count Unique Values Matching Criteria

Jun 4, 2013

I have a worksheet. I would like to count unique number of "Trans" in column A only if value of cells in column B "Type" equals "Return". In example below, I would want to see the value "3" as total.

Trans Type
1 Return
2 Return
2 Return
3 Exch
4 Exch
5 Return
5 Return

View 9 Replies View Related

IF Function In A Formula - Calculate Array Of Values

Jun 15, 2014

If the data looks like this:
10
7
6
10
9
9
3

What would the formula be to calculate that array of values = 57% because 4 of them are equal to or greater than 9, and there are 7 of them in total? The formula should accommodate however many numbers are listed and calculate what percentage of them are 9 or 10.

View 5 Replies View Related

Copy And Paste Unique Values From Column And Use Countif Function To Calculate Average

Jan 19, 2013

I'm stuck on the final piece of my macro project. I've attached a workbook with two sheets: sheet 1 is what I currently have, and sheet 2 is what I'd like my report to look like when complete.

On Sheet 1:
- column B is called Supervisor Name
- Columns D-O are months of the year, with either a Yes or No in each cell.

I'd like to write a macro that will:
- Take all unique values in Supervisor Name column, and paste these Above the current table.
- For each Supervisor, and each month, I'd like it to calculate, as a %, the number of Yes mentions in each month divided by the total cells (Yes/(Yes+No)).

Sheet 2 contains the output, in the format I'd like to see it.

Sheet 2:
Supervisor Name
October
November
December

Supervisor 1
8.3%

[Code] .......

View 7 Replies View Related

Function To Return A "true" If Three Values In An Array Match.

Jan 26, 2010

I need to figure out how to match three values on the "source info.xls" file attached to the "PFG FILE.xls" that is also attached. In column A in the "Source info.xls" file the formula will need to match the yellow column, then the green column, then the red column. keep in mind that the attached files are just a small subset of data. The "PFG File.XLS" is actually 150K rows long.

View 5 Replies View Related

Count All Unique Values (text) + Definition Of UNIQUE :D

Aug 24, 2009

If I have multiple entries with different but repeatable text values in one column - how do I count all unique ones ? Is there a function or does it have to be a pivot table of sth ?

View 14 Replies View Related

String Array Values To Array Of User-Defined Types

Oct 2, 2008

I have a class module with several private variables, including one that is an array of a user-defined type. I am trying to set the values of a single element of this array with "Property Let ..." from a string array:

View 4 Replies View Related

Macro To Give Count Of Unique Values After Comparing Comma Separated Values?

Mar 2, 2014

I need a Macro (not formula) which compares the comma separated values present in Column "I" with individual values present in Column "D" and generate the count of unique values in Column "J".

The sample sheet has been attached for reference.

View 3 Replies View Related

Excel 2010 :: Produce Unique List Of Key Values With Second Values Concatenated Together

Sep 15, 2013

I have some data with recurring key values and differing values in the second column, I need to produce a unique list of key values with the second values concatenated together.(See below)

The data can be 10 rows to 5000 and I can have anything from 5 to 150 sheets (Separate data sets), a macro would go a long way to keeping me sane.

Sample data Required Output
A | B Z
1| 10 | a 10,a,b,c
2| 10 | b 11,a
3| 10 | c 12,a,b
4| 11 | a
5| 12 | a
6| 12 | b

My system is Windows 8 Excel 2010.

View 7 Replies View Related

Formula For Obtaining List Of Unique Values But Not Including Values Which Contain IC

Aug 14, 2014

1. Using a formula, I am trying to to obtain a list of unique values (string) (caveat: see #2) from the range E2:E10000 (arbitrarily chose 10000 - the row number is variable)(see #3).

I currently have a formula that seems to work for this purpose but I don't know how to add the condition in #2 (below)

2. To include all unique string values except those starting with the letters "IC"

3. Is there a way to make this formula so that it can only seek values up to the last row, and not go to the 10000th row if not necessary? The E column has no empty cells until after the last row that contains data.

Here is the formula I currently use which serves #1 (above):

[Code] .....

Any way to improve/simplfy this formula for the purpose describbed in #1? How can I add the condition in #2? Can you see a way to include #3? The most important issue here is #2.

Example of desired results:

Column A | Column B
AA | AA
DD | CC
AA | DD
CC |
DD |
DD |
IC |
IC |

View 14 Replies View Related

Count Unique Values In Column Based On Values In Other Columns

Mar 14, 2014

I'm running into an issue trying to calculate unique values in a Data column based on a few variables in other columns.

My current formula in Summary tab D4:D19 is
{=SUM(IF(FREQUENCY(IF(Data!$I$3:$I$66<$E$1,IF(Data!$A$3:$A$66=$H$1,
IF(Data!$C$3:$C$66=A4,ROW(Data!$I$3:$I$66)))),ROW(Data!$I$3:$I$66)),1))
+
SUM(IF(FREQUENCY(IF(Data!$I$3:$I$66<$E$1,IF(Data!$A$3:$A$66=$I$1,
IF(Data!$C$3:$C$66=A4,ROW(Data!$I$3:$I$66)))),ROW(Data!$I$3:$I$66)),1))}

This is currently counting the number of times a date value (data column I) appears for that name (A4:A19) in the data when meeting all of the conditions. I need it to instead count the number of times a unique date appears for that name with the additional conditions met (which all appear to work fine).

The results in the pink highlighted cells (Summary column D) should be:

Names starting with A - 3
All others - 2

I've left some other columns in the data with X's so that I can easily convert this back to my working spreadsheet.

View 2 Replies View Related

How To Match Array Values To Other Array Values

Oct 22, 2013

Question contained within code:

Code:
Dim MyArray(6, 1) As String
Dim i As Integer
'' Array List 1

[Code]....

'If lbxLI = any list index from Array List 1 then use the value stored in Array List 2 to give Listbox 2 its rowsource.
'For example; ListIndex "0" would produce a row source "_0" for listbox 2. Else if ListIndex "1" is selected, produce row source "_1" for listbox 2.

' I would like to achieve this from one "If" statement. I'm guessing it must be possible using a loop, I just can't think how despite a lot of messing about with code.

View 1 Replies View Related

Extract Unique Distinct List From Two Columns With Array Formula And Sort From A To Z

May 30, 2014

I have two lists in different columns, which are defined ranges. I want to extract them to a unique list with an array formula and at the same time sort albafetically, without duplicates, like this:

List1
List2

Final List

Audi
Ford

[Code] ....

So far, I have this formula which is working in what concerns removing duplicates and exctract a unique list. But it is not ordering alfabeticaly.

{=IFERROR(IFERROR(INDEX(List1, MATCH(0, COUNTIF($D$1:D1, List1), 0)), INDEX(List2, MATCH(0, COUNTIF($D$1:D1, List2), 0))), "")}

View 2 Replies View Related

Look Across Values In 12 Columns, Return The Number Of Unique Values

Apr 17, 2009

I have 12 columns of data. In those 12 columns of data I have 3 digit numeric IDs. I want to count the unique number of IDs for each row. I have about 14K rows.

What would be the best way to do so?

Some rules about how the data is stored. I have 12 columns of data with anywhere from 1 to 12 columns having data for each respondent. Data always fills left to right and never skips columns.

I have attached an example file that represents how the data is stored and the output I would like (Unique Count).

View 7 Replies View Related

Unique Value Function

Aug 28, 2009

I know there is something I have to do to the worksheet before it will reconigze the function?

View 2 Replies View Related

Unique Values From List Of Many Duplicate Values?

Jan 31, 2014

how to get this with formula:

Column A - - Column B
a - - - - - - - a
a - - - - - - - b
b - - - - - - - c
c
c

View 8 Replies View Related

Count Unique Values, For Specific Values

Sep 13, 2006

I have an array that I'm using - and it works perfectly: =SUM(If((FREQUENCY(If(LEN(B10:B100)>0,MATCH(B10:B100,B10:B100,0),""),If(LEN(B10:B100)>0,MATCH(B10:B100,B10:B100,0),""))>0),1))

Now, what I would like to do, is see how many of these unique numbers relate to another number in column D
See attachment.

View 4 Replies View Related

Unique Ranks Function

May 10, 2007

I have a list of data where some of the cell values are the same. I want to rank them uniquely but when I use the RANK function the cell values that are the same are given the equivalent rank. Is there any way of assigning the equivalent values a sequential ranking that is unique?

So in this example rather than producing the rank as this:

100 1
99 2
98 3
98 3
98 3
97 4
96 5
95 6

It would produce it as this:

100 1
99 2
98 3
98 4
98 5
97 6
96 7
95 8

View 9 Replies View Related

IF Function For Last Occurring Unique Cases?

Mar 26, 2014

I have an excel file that lists individuals who came into the clinic on a given day. I am interested in figuring out the amount of unique individuals in a given month/overall. As this is a working datasheet, I would like a formula that would automatically update this information for me. Here is an example of the file that I am working with: unique case example.xlsx

Specifically, I want an IF function that could place an 'x' in column E depending on if the name in column C is a unique instance. But if the name appears several times in the list, I would also like this function to place an 'x' in column E next to the last occurring unique instance. For example, the name 'Hanna D' occurs 3 times in the spreadsheet I have attached, but I want the 'x' to be next to the most recent incident, when she was screened, as opposed to when she was not contacted (missed/doc forgot).

I am not sure if you can even define a unique case in the IF function, let alone the last occurring unique case.

I am not interested in conditional formatting (highlighting duplicate cases and then placing an 'x' next to the most recent highlighted case) because my spreadsheet has 300+ individuals and it is very time consuming to manually move the 'x' when the same individual appears at a later time.

View 4 Replies View Related

Creating Unique ID Using Concatenate Function

Mar 26, 2014

I need to create unique IDs for all of my stock. I would like to use the concatenate function so that the first letter of each products type is taken and then joined onto a unique number. Im not sure how I will do this I was thinking that the formula looks at the largest value and adds 1 so that there are no duplicate numbers added to the first letter of the product type. E.g. the first mother board added will be "M1" the next will be "M2" as the formula has found that M1 exists and has added 1.

View 3 Replies View Related

Count Unique Results: Function &lt;&gt; Filter

Dec 27, 2007

Data: four variables A,B,C and D from A2:D6000

I want a count of unique D values
when A=xxx
and B=yyy
and C=zzz

I have named the A,B,C,D ranges as RangeA, RangeB, RangeC, RangeD

I have used the function

=SUM((RangeA="xxx")*
(RangeB="yyy")*
(RangeC="zzz")*

But what do I use to count-unique values of variable D ?

=SUM(IF(FREQUENCY(RangeD,RangeD)>0,1)) doesn't work.
=SUM(1/COUNTIF(RangeD,RangeD&"")) doesn't work either

They don't work because D can occur during different combinations of A,B and C. In other words, the D value of 'Smith' can, and does, occur when A is 1,2 or 3 and additionally when B is Pass, Fail, Withdrawn.

They "don't work" because I can use filters on A, B, C and D to see what the correct answer should be .. and the function doesn't return the correct answer.

I hope I've explained this ok - I've been searching on several excel-help websites for 2 days now and one of the days my client is going to want some results.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved