Create New Workbook For All Unique Values Of Column

Apr 23, 2008

this code "Creates a New Workbook" for each item listed in an excel table, then, copy all unique values in their respective Workbook and save it. So, the problem is this. instead of creating a "New Workbook", i want to open a previously created Workbook (template) and do the procedures listed above. Is this posible?

Sub Copy_To_Workbooks()
Dim CalcMode As Long
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim WSNew As Worksheet
Dim rng As Range
Dim cell As Range
Dim Lrow As Long
Dim foldername As String
Dim MyPath As String
Dim FieldNum As Integer
Dim FileExtStr As String
Dim FileFormatNum As Long
Set ws1 = Sheets("Sheet1") '<<< Change
If Val(Application.Version) < 12 Then
'You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143
Else
If ws1.Parent.FileFormat = 56 Then
FileExtStr = ".xls": FileFormatNum = 56
Else
FileExtStr = ".xlsx": FileFormatNum = 51
End If
End If..............

View 6 Replies


ADVERTISEMENT

Create New Workbook For Each Unique Record In Column

Jun 13, 2007

I have to copy and paste each group of "Control Accounts" from column A into a separate workbook. I want to create a macro that can open as many new workbooks as there are unique records in column A and copy paste each group of unique records into those different workbooks.

View 7 Replies View Related

Create Workbooks Based On Unique Values From A Column?

Oct 9, 2012

I have a workbook with about 10000 rows of data for about 100 suppliers in Sheet1 and about 15000 rows of same Suppliers payment details in sheet2.

What I am doing now is:-Filter every supplier names in Column A of sheet1, copy all the rows and paste in sheet1 of a new workook & Again copy the Payment details of a same supplier from master file sheet2 and paste the same in sheet2 of this new workbook then save the files with the supplier name as file name in my documents folder code, that filters each suppliers data from sheet1 & 2 and paste in new workbook sheet1 & 2.

View 1 Replies View Related

How To Create Table Of Unique Values

Mar 17, 2012

I have a Column, say column A, setup with a lot of repeated data. Now what I want is to pick only a single value from each set of data and put them into a separate column. for example:

Col A
1
2
3
2
4
1
5
4
1s
a2
1s
a2
a2
6

What I want the excel to do is to pick from the above data only a unique value and put them into a separate col, like this:

Col C
1
2
3
4
5
1s
a2
6

View 5 Replies View Related

Create List Of Unique Values

Jul 23, 2007

In column A I have values starting at row 4, ranging up to row 1004.

in coulumn Q (starting at row 3) I'd like a list of unique entries from column A

I know this line is my problem

If Range("A" & I) Range("Q4:Q30") Then
but i'm not sure how to compare against all values in a range

Sub FilterSymbol()
Dim I As Integer
Dim X As Integer
X = Range("O2")
I = 4

Do
If Range("A" & I) Range("Q4:Q30") Then
Range("Q" & I) = Range("A" & I)
I = I + 1
Else: I = I + 1
End If
Loop Until I >= X
End Sub

View 9 Replies View Related

Create Unique List Of Values Across 5 Sheets

Oct 13, 2011

I am trying to create a macro that will create a unique list of the values in the same column across 5 worksheets, "Question1", "Question2", etc, and place the list in a new worksheet, "Summary".

The values are in column A in all of the worksheets, and the number of rows in each worksheet will change each day. I need the unique list to be added to the sixth worksheet, "Summary".

Also, after the list is created on the Summary worksheet, I need a count of each field by worksheet and a total. This is how I currently have the Summary set up:

Part Type|Total|Question1|Question2|Question3|Question4|Question5
Name|=SUM(C2:F2)|=COUNTIF(Question1!$A:$A,A2)|
=COUNTIF(Question2!$A:$A,A2)|=COUNTIF(Question3!$A:$A,A2)|
=COUNTIF(Question4!$A:$A,A2)|=COUNTIF(Question5!$A:$A,A2)

View 6 Replies View Related

Create Unique List & Summarize All Associated Values

Jan 30, 2009

I have a list of sales events that ran at various venues, together with how many people attended and how much revenue was brought in by sales. This data is arranged by week. One venue will never have more than one event per week, but different venues may have sales events on the same week.

My table looks like:

In reality this list could be thousands of rows long.

“Event week” is the calendar week of the event. “Weeks open” shows for each event how many weeks that venue has been open (may or may not be useful!).

What I need to do is to be able to pick a number of weeks (preferably changeable by entering into a cell) and have a list produced of each venue that has run for at least that many weeks, and the sum of people and sales in those first X weeks. My idea of output, if the user input “2” as the number of weeks would therefore look something like:

Note that
1)only venues that have run at least 2 meetings are shown in the output
2)even if venue has run over 2 meetings, only people and sales figures from the first 2 are summed up and displayed.

In this case. Later on I need to produce a frequency chart/histogram grouping the results into categories, but I know how to do this as long as I can get to the step before – but wanted to mention it in case there are shortcuts.

Have been battling with this with pivots, database functions, array formulae etc. for a long time.

Attached is the spreadsheet with sample data. The red table is the part I am stuck on. The solution has to work in Excel 2003.

View 4 Replies View Related

Create Unique List Of Values From Two Ranges With Criteria?

Jun 12, 2014

I have two lists of values in separate columns with condition in adjacent cells, all on the same sheet

List 1 consists of numbers from 1 to 12, column to the right is either blank or Free
List 2 consists of numbers from 13 to 24, column to the right is either blank of Free

List 1 starts in A2, B2 is either blank or Free
List 2 starts in D2, E2 is either blank or Free

In column G, from G2 i want it to list all values from List 1 and List 2 where their status is Free

View 14 Replies View Related

Importing Values From Sheets To Create Unique List

Jun 2, 2009

I need to be able to pull information from 5 columns on 5 different pages, and pull all of the unique names out of it. From there, I need to create a list of all of these names. More often than not, this could only be three names, but I still would like this to be automatic because eventually it could be 50 or 60, and manually editing this list would get tedious. Lastly, is it possible to have a list create cells? For example: I have information on row 4, this one will start on row 6. My next group of information starts on row 14. That leaves 7 rows for information. I don't want to leave a large gap at the top of the page, so I'd like to be able to create cells if the list I'm trying to create has more information on it. Seems plausible in my mind, but I'm still new to excel.

View 14 Replies View Related

Create Unique Values List While Overwriting Old Data?

Jan 24, 2012

I will copy a report into sheet 1, starting in the same place(A1), on a weekly basis. The headers are: Item, Quantity & Price

Week 1's report shows the following:
Windows 5 $1.00
Doors 6 $1.50
Chairs 7 $2.00

Week 2's report shows the following:
Windows 3 $1.00 (change in quantity)
Tables 7 $5.00 (new item)
Chairs 7 $2.50 (change in price)

I need to have a rolling, unique list on Sheet 2 that will do the following:

- add new line items

- keep old line items while checking to see if the quantity or price has changed.

Therefore, after week 2's report is pasted on sheet 1, Sheet 2 should look like this:

Windows 3 $1.00
Doors 6 $1.50
Chairs 7 $2.50
Tables 7 $5.00

Here's the most important part: There will be formulas in Column D in Sheet 2 that I need to stay with each item. generating the desired result on Sheet 2!

View 9 Replies View Related

Create 1 List Of Unique Values From 12 Columns Of Data

Apr 28, 2014

I have a spreadsheet of 12 columns (A to L), with a list of student names under each down to row 31. Each column represents an after-school club that the child can attend.

However, a child can sign up to multiple clubs, so their name can appear in several places across the spreadsheet.

What I would like to do is have a 13th column which is an overall list of students who have signed up to at least 1 club, i.e. their name appears at least once in columns A to L.

How do I achieve this so that only unique entries are listed and duplicates are removed in this 13th column?

View 7 Replies View Related

Create Unique List From Column With A Condition

Jun 3, 2007

I have a test sheet thus :

+ABCDEFG
1Bob11234
2Sally2
3Ann3
4Emily4
5Lexi3
6Bill2
7Josh1
8Jacob2
9Mary3
10Gary4
11

In D2:D11, I want a non-duplicate list of all the "1" names, i.e., Bob and Josh. In E2:E11, a list of all the "2" names (Sally, Bill & Jacob), and so on. Sorted would be nice, but not necessary. When new names and their numbers are added to A1:B200, they need to automatically show up in D2:G:201 as appropriate. I've looked over VLOOKUP, INDEX, MATCH, etc., but all seem to simply return the first and not every match. Maybe I'm just missing it.

Is this possible without VBA? Not that I have any objection to it, but delving into and learning it is a little outside the available time I have now. If it takes VBA I'll address it when I can free up some time.

View 5 Replies View Related

Create Unique List From Column With Duplicates

Feb 27, 2008

I want to end up with a list of unique items (nothing repeated) from a variable length list starting in cell B5. That unique list is then placed in cell D3.

I am using the code below (found on Ozgrid) which almost works. But it seems to be dependent on what’s in column A (which I wish to ignore) for it to work.

How can I modify the code so that the results are based on column B only?

Dim Rng As Range
Dim fRng As Range
Dim lRow As Long
Dim Dest As Range

lRow = Range("B" & Rows.Count).End(xlUp).Row
Set Rng = Range("A5:B" & lRow)
Set Dest = [D3]

With Rng
. AutoFilter Field:=1, Criteria1:="1*"
Set fRng = .Offset(1, 1).Resize(.Rows.Count - 1, 1).SpecialCells(xlCellTypeVisible)
With fRng
.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Dest, Unique:=True

End With
End With

View 7 Replies View Related

Summing Up Values In Column Corresponding To Unique Distinct Values In Another Column?

Dec 24, 2013

I have two columns in excel, col A and col B.What I would want to achieve is following:

Col A Col B
A 2
A 2
A 2
B 3
B 3
B 3
B 3
C 3
C 3
C 3

Now I want a total of values in column B pertaining to unique (or say 1st occurences) of values in Col A. So in this case the output should be 8 ,Achieved as follows(2 +3+3).

[URL]

View 5 Replies View Related

Create Column Of Data Based On Unique Items

Dec 19, 2006

I am trying to seperate singlr column information into seperate column based on the name in the Data 1 column.

Ex.
Data1 Data2 Result 1 Result 2 Result 3
one100one100two200three1
one350one350two450three2
one500one500two600three4
two200
two450
two600
three165
three236
three450

View 3 Replies View Related

Combine Multiple Cells To Create Unique Cell Value In A Column

Sep 23, 2012

I would like to know how to combine multiple cell value from each column to create a unique value. for example column A will have values (a,a,b,c,d,e,e,f,i,j) and B will have (1,2,1,1,3,4,5,5,6,7) and C has ( xxx,yyy,zzz,xxx,yyy,zzz,xxx,xxx,yyy,zzz).

i need to create a list of unique possible combination of data into column D.

I have placed below example and how to create a similar code and what functionality does this.

A
A Code
B
B Code
C
C Code
D
D Code

[code]...

View 5 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

Apply Formula In New Column That Pulls Unique Values From Another Column?

Apr 24, 2014

see the attached spreadsheet including the data. In Column AA I have created a formula that looks at Column B, and pulls each unique value from that column. add to this formula, or propose a new one, that pulls unique values into column AA if at least one of the rows has an "Actual Finalization Date" in column D that is in 2014?

View 1 Replies View Related

Capture Unique Values From 1 Column And Populate The Result Into Another Column

Aug 28, 2009

I have values in COlumn A, probably about 50K rows, The total unique values on the column A is only about 27. I need to capture all those unique values and paste them in column B. I didn't want to do "Advance filtering" since the workbook has many macros's on it that the user simply click on. Im thingking of creating a loop and compare values already pasted in Column b but then that will take too much time to complete the loop. Is there any easier or yet more efficient way to accomplish this?.

View 2 Replies View Related

Count Unique Frequencies Column A For Pacific Values Column B

Dec 19, 2010

I would need to count unique frequencies in column A, but only for a specified value in column B.

Example:

A|B
1|1
1|1
1|1
2|1
2|1
2|2
2|2
3|2
3|2

I am using Excel 2007 and found this formula that counts all unique frequencies in column A: =SUM(IF(FREQUENCY(A2:A10,A2:A10)>0,1))

In my example, result = 3 Now, I would need to add the possibility to count only for B=1; in my example, result should be = 2.

View 9 Replies View Related

Find Unique Values, Transfer Adjacent Cell To Another Workbook

May 22, 2007

I have a main workbook that is meant to summarize data from other workbooks

In Row 6 from column H on I have workbook names in each cell

Column G in all workbooks (including the main one) contains our branch #'s for our offices

For each workbook listed in row 6 , I need to open that workbook (I have that setup with the code below---notice there is an AX.xls that is appended to the file names listed in row 6 in order for the names to match what is in the windows directory)

In the newly opened workbook, I need to, for each value in column G, copy the value from adjacent cell in column H (the dollar value) then search column G of the main workbook for a matching branch and paste the value to the appropriate row under the workbook name column (remember workbook names are in row 6)

The trouble is, for each branch in column G in the newly opened workbook that cannot be found in the main workbook, I need to paste the new branch # at the bottom row of/in column G and the $ value (H column value from the newly opened workbook) to the corresponding row under the workbook name column

Sub OpenWBs()

Dim Rng As Range
Dim WB As Workbook
Dim MyPath As String
Dim lastCol As Integer
Dim newRange As Range

lastCol = Cells(6, Columns.Count).End(xlToLeft).Column

Set newRange = Range(Cells(6, 1), Cells(6, lastCol))

MyPath = "F:AccountingAPAdvertising AccountsLA TimesAgentExtractorCompletedLIST"

For Each Rng In newRange '

View 9 Replies View Related

Fill Column B Based On Non-unique Values In Column A?

Apr 21, 2014

I have a worksheet with Coulmn A and B , wherein , Column A has a list of values that can be duplicated. Based on the values in Column A, I want to fill corresponding cells in Column B. see the attached.

way to accomplish the same. Tried VLOOKUP.

View 1 Replies View Related

Count Unique Values In One Column If Other Column Matches?

Oct 18, 2011

How do I count unique values in Column A only if the values in Column B match?

A B
1 a
2 a
1 a
4 b
5 b
1 b

The formula would return "2" for "a", and "3" for b. Basically, there are names in column B, and I want to know how many unique things are in column A for each person. If there is a better way than a formula (pivot table?) that would be great - like a table that has each of the names (from Column B) and the number of unique items from Column A next to each unique name.

View 5 Replies View Related

Pulling Unique Values From A Column

Nov 12, 2007

HOW TO pull the unique values out of a column of entries and put them into another column.

For example I'll have a list of maybe 2,000 but with only 1-7 different values in the column, what I want to do is populate another column with only the list of the 1-7 values that appear in the larger set.

View 14 Replies View Related

Separate Unique Values To Another Column

May 30, 2012

How to separate unique values to another column in Excel apart from using Advanced filter..,, that is by using formula??

Since I need to separate unique values dynamically, i'm in need of formulas to do that...

View 5 Replies View Related

Finding Unique Values In A Column?

Nov 22, 2013

I have an excel sheet with about 1000 reference numbers in. I would like to know how many of these are unique...they look like this:

UCR104

UCR1042

UCR1043

UCR1048

[Code] ........

View 4 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

Counting Unique Values In A Column?

Jan 17, 2008

How can I count the number of unique values in a column?

I have a spreadsheet that lists transactions that occurred over a one-year period (2007). I need to determine the number of days our facility was operational. No transactions on a particular date (25-Dec-07, for example) and the facility would be considered to have been closed on that date.

On the days that the facility was open, multiple transactions would have occurred on those open days and those multiple tranactions are all reflected in the worksheet.

So I need to count each occurrence of '01-Jan-07', '02-Jan-07', and so on.

View 9 Replies View Related

Find Unique Values Under A Column

Jan 22, 2009

In an excel sheet i have around 10 columns.

I filtered the data based on the column1 using vba. Then after that, the filtered data in column2 have repeat finance accounts. What i need to find the unique finance accounts under the column2.

Is there any methods to find the unique value under the column2?

View 9 Replies View Related

Sum Unique Values That Exist In Another Column

Oct 31, 2006

I need to find the unique column values and sum the next column values. i,e

ID XXX
1 100
2 200
1 100
3 500
4 600
2 200
--------------------
Total 1400

View 9 Replies View Related







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