Create Duplicate Rows Based On Value In A Column?
Feb 6, 2010
I have a worksheet with two columns and a few hundred lines. One has titles and the other integers indicating how many times the title needs to be copied to another worksheet or text file.
Existing Worksheet (Input)
TitleA1
TitleB6
TitleC4
TitleD3
Desired Output (Worksheet or Text File) [The entire row, including the integer could be copied as well, if it is easier.]
TitleA
TitleB
TitleB
TitleB
TitleB
TitleB
TitleB
TitleC
TitleC
TitleC
TitleC
TitleD
TitleD
TitleD
View 7 Replies
ADVERTISEMENT
Feb 6, 2010
I need a VBA/macro very similar to several I have seen posted here. I have a worksheet with two columns and a few hundred lines. One has titles and the other integers indicating how many times the title needs to be copied to another worksheet or text file.
Existing Worksheet (Input)
TitleA1
TitleB6
TitleC4
TitleD3
Desired Output (Worksheet or Text File) [The entire row, including the integer could be copied as well, if it is easier.]
TitleA
TitleB
TitleB
TitleB
TitleB
TitleB
TitleB..............
View 2 Replies
View Related
Aug 23, 2007
I need VBA help. I know how to highlight every other row but what I can't do is highlight a row if column values are the same. For example I have 5 columns but only the first one has the data I'm interested in. If the data in the first column looks something like this:
1
2
3
4
4
5
5
5
6
6
6
7
.
.
I want to highlight every other row that has similar values therefore I want to highlight row 2, both row 4s, and three 6s...etc.
I also want it to start on the 2nd row of every page until the last row of every page which is row 37 in my case.
View 9 Replies
View Related
Jun 12, 2008
creating a macro for an excel spreadsheet? The problem I am faced with is I need to reduce a xls file from a ticketing system at work that contains roughly 50,000 rows.
What I need to have done is reduce a Site Code column (column B) so that for each ticket entry there is only one occurrence of each user that worked on that ticket.What the macro should do is to look through column B and remove any duplicate rows for the same ticket number located in column A. once the macro gets to the next ticket number in column A I need it to start over on the duplicate check for column B.
I have a attached a xls file to this post to try and show what it is i am working on.
View 8 Replies
View Related
Apr 6, 2012
I have to create 1000 dynamic ranges and do not want to do this manually. See the list below for the syntax I am using, I am only showing the first 10.
Name Range
KPI_01=OFFSET(Date,0,1)
KPI_02=OFFSET(Date,0,2)
KPI_03=OFFSET(Date,0,3)
KPI_04=OFFSET(Date,0,4)
KPI_05=OFFSET(Date,0,5)
KPI_06=OFFSET(Date,0,6)
KPI_07=OFFSET(Date,0,7)
KPI_08=OFFSET(Date,0,8)
KPI_09=OFFSET(Date,0,9)
KPI_10=OFFSET(Date,0,10)
I have tried the following code which works to an extent...
Range("=OFFSET(Date,0,1)").Name = "KPI_01"
..but the final result of the named range is an actual range, i.e. "A1:A13".
How can I keep the named range as a dynamic range?
View 5 Replies
View Related
Oct 28, 2009
I have a excel file which contains dublicate rows. The duplicate rows can be identified based on few cell/column values. I need a macro to delete the duplicate rows when the below condition is satisfied: let us consider row 5 and row 6:
If column 7,12,13,16,17,18,19,23,24,27,28,29,30 in row 5 = row 6 then row 6 has to be deleted. This condition has to be followed for all other rows in the excel used range. Have attached the sample workbook.
View 5 Replies
View Related
Apr 11, 2014
I'm trying to make an order form that is based off of a price list. Basically there will be 200 items or so someone can just enter the quantity they want into a column. I would then like another sheet on the workbook to auto-populate all of the fields available. The thing I'm having trouble with is I don't want the finished form to be as long as the price list with blank rows in-between. I've been reading up to make a macro work for this, but have had no success.
View 3 Replies
View Related
Jun 26, 2013
Everyone always want to get rid of duplicate rows.
Is it possible to create duplicate rows of all the existing rows?
View 5 Replies
View Related
Nov 19, 2009
On some occasions the part number has several to collect but the output from the system we use will output this as a sinle line and a quantity of 2 for instance. I would like a macro to indentify all of the parts with a quantity more than 1 and insert a duplicate line with that quantity.
On the attachement sheet 1 is an example of how the data may look, sheet 2 is how I would like it to be after the macro has been run (but within the same sheet)
View 4 Replies
View Related
Nov 25, 2009
I currently use the following code to create a duplicate file based on two cells within a directory and folder i specify. These cells consist of the team and week commencing date (mondays date of week which is cell 'Main Menu'!K8)
View 7 Replies
View Related
Dec 8, 2009
I have a sheet where i want to delete duplicate rows where column A and column B combined are equal, i.e. range(Ax:Bx) where x is the current row. I am using the macro below but cant seem to get it working as I keep getting a type mismatch error and Im not sure why.
View 2 Replies
View Related
Aug 8, 2007
I am using three columns - Col A contains serial number, col B contains name and Col C contains Codes.
The problem is in col C as sometimes the codes are copied from other files also. So I want that if there is any duplicate codes in column C, on running the macro it will delete the duplicate rows and keep original record ie the duplicte records added later has to be deleted and that the original record will be in place.
View 9 Replies
View Related
Feb 18, 2010
I need to filter the following file.
I need to remove all rows where COL A value and COL B value are the same. COL C does not need to be considered. However I need to retain one of the Col C values for purposes of formatting.
The end result should look similar to columns F,G and H!
View 2 Replies
View Related
May 22, 2014
I have a large spreadsheet that has some duplicates in Row Q. However, in column L there is a date. I want to be able to find the duplicates in column Q then delete the duplicate with the earliest date.
[Code] .....
View 4 Replies
View Related
Nov 3, 2011
a quick macro/VBA project that would allow my to duplicate existing rows based on the count in one of the cells. For example, my data currently looks like this:
DCITEMITEMDESCVENDORCOST ABCSTATUSRCATOHExtended Cost 1st Discount Level 2nd Discount Level CGO6-IAVHORN12/24VDC MINI HORN07697$ 12.69 UA24901$ 12.69 $ 9.99 $ 5.99 CGBK-PR2AEPOXY-ENCAPSULATED RELAY W/ACT20775$ 7.43 SA25203$ 22.29 $ 5.99 $ 3.99 CGSF-SUB901CLEAR 2"SPACER F/STI 910507450$ 7.88 SA25904$ 31.51 $ 5.99 $ 3.99 CG0Q-BLTBWIR21OUT B/W IR BULLET 420TV 3.6M01047$ 66.59 XD31211$ 66.59 $ 49.99 $ 32.99
And I want to duplicate the rows based on the quanity in the OH column (highlighted in yellow) - so that it looks like this:
DCITEMITEMDESCVENDORCOST ABCSTATUSRCATOHExtended Cost 1st Discount Level 2nd Discount Level CGO6-IAVHORN12/24VDC MINI HORN07697$ 12.69 UA24901$ 12.69 $ 9.99 $ 5.99 CGBK-PR2AEPOXY-ENCAPSULATED RELAY W/ACT20775$ 7.43 SA25203$ 22.29 $ 5.99 $ 3.99
[Code] ........
View 3 Replies
View Related
May 1, 2012
I have a sheet which has the following Columns:
Name..........Sales..........Returns..........Net
These are columns B,C,D,E,
Because the data is imported, it shows one row for the person's sales and another for their returns like this:
Dave...........100...............0...............(Blank)
Dave..............0.............-20..............(Blank)
Fred............200...............0...............(Blank)
Andy..............0............-500..............(Blank)
What I am trying to do is get the net sales of 80 in either of Dave's rows in the Net column, then I can hide the duplicate row. However, this is complicated by the fact that names without returns, (like Fred in this example,) do not have a second row. (This also applies to those names without sales, but with returns, like Andy).
View 6 Replies
View Related
Mar 12, 2013
Every week I get a report that contains 1 or more (sub) part numbers in each row down column E, separated by a space. I need each part on a separate line, with the rest of the data on that row intact. Because these are the sub-components of an overall part, the data in column E is stored grouped together like that.
I currently use text to columns to break those up, separating them by the space, add a count of those cells so I know how many sub part numbers there are, run a 'duplicate rows' macro on that count, then manually delete out numbers so I'm left with one part number per row. The report is already over 100 rows long, so after I run the 'duplicate rows' macro I have a lot of rows to work through.
View 7 Replies
View Related
Jan 7, 2010
How do I delete duplicate rows in a sheet using a macro. When I say duplicate row, it is not based on a particular column but all the columns, so it is a true duplicate record.
View 9 Replies
View Related
Aug 14, 2007
I have a problem of having to repeatedly copy and paste a series of data based on the number of occurrences in each row of data series. For instance:
[Road Name] [Building Name] [No. of occurrence]
(1) [Scotts Rd] [Tangs Building] [38]
(2) [Orchard Rd] [ABC Building] [3]
(3) [French Rd] [DB Bank] [1]
I will need to duplicate (1) 38 times with the location name and building name. Similarly, I need to duplicate (2) 3 times. How can I simplify it programmatically?
View 3 Replies
View Related
Mar 1, 2008
I have a number of rows that I want to have duplicated X number of times (and altered) where X is found by looking at certain cells within each row.
There are four numbers in each row, and I want to split them up into multiple rows each with three zeros and one one.
I would like to convert data from this:
Name W X Y Z
John 1 0 0 0
Doug 0 0 1 0
Karl 3 0 1 0
Mike 0 1 1 2
etc.
...to this:
Name W X Y Z
John 1 0 0 0
Doug 0 0 1 0
Karl 1 0 0 0
Karl 1 0 0 0
Karl 1 0 0 0
Karl 0 0 1 0
Mike 0 1 0 0
Mike 0 0 1 0
Mike 0 0 0 1
Mike 0 0 0 1
etc.
You can see that the W, X, Y, and Z columns from the four new Mike rows sum to equal the values in the original Mike row (0, 1, 1, 2), but everything has been split so that each row just has a single one in it and three zeros.
Does anyone have an idea of how to do this? Thanks Auto Merged Post Until 24 Hrs Passes;I thought of another way of putting it that may be easier to understand.
Given an input row of "George, 4, 7, 3, 2", I would like the output to contain 4 rows of "George, 1, 0, 0, 0", 7 rows of "George, 0, 1, 0, 0", 3 rows of "George, 0, 0, 1, 0", and 2 rows of "George, 0, 0, 0, 1".
View 3 Replies
View Related
Apr 26, 2009
I have attached a spreadsheet of sample data. Column I has duplicates and the data in columns A to H are in any of the duplicates. I want to eliminate the duplicates and align the data in the other colums to the single row. Eg I2 and I3 are the same value, I want to end up with only one row with the value 27217 and the data in F2 and G3 to end up in the single row. If value 27217 is in I2 only then F2 will still contain 5 but 6 will be in G2 not G3.
View 3 Replies
View Related
Nov 28, 2013
I have a sheet with 45,000 rows. Let's say each row has 4 columns: Create_timestamp, Update_timestamp, email_address, and o_flag
Many rows have duplicate email addresses. I would like to remove all the duplicate rows, EXCEPT for the row with the most recent Update_timestamp.
And actually, if I could just "hide" all those rows, that would be even better, but I'd be happy just figuring out how to delete all the "old" rows, so I just have a list of unique email addresses, with their create/update timestamps and o_flag column. Seems like this is such a basic use case for "Remove Duplicates,",.
View 1 Replies
View Related
Jun 18, 2009
I need to concatenate and de-dupe. I want to find dupes, concatenate a column, and the delete the duplicate columns--all while maintaining data from other populated columns.
Here is the some example data:
#| Type | Name
1 | A | Bob
1 | B | Bob
1 | C | Bob
2 | B | Sally
2 | E | Sally
3 | A | Bill
3 | C | Bill
4 | E | Nancy
The result should look like:
# | Type | Name
1 | A, B, C | Bob
2 | B, E | Sally
3 | A, C | Bill
4 | E | Nancy
I am using Excel 2003.
View 5 Replies
View Related
Feb 26, 2014
What im needing is something that will duplicate each row based on Column F as shown below... However I also need the duplicate row numbers added to Column G and then the original row deleted... I will try and show you an example of the input/output i would like to achieve: (also the first row can be ignored it will all be headers)
INPUT
ROUTE
NAME1
NAME2
ADD1
DESC
3
WOOD000001
PW
ID
[code].....
View 1 Replies
View Related
Jul 28, 2013
with deleting duplicate entries in a spreadsheet that contains two names, a code number and a date. All rows with a duplicate number in column “B” should be deleted. Write a micro code? I have a few thousand of entries that need to be knocked out.
A sample file is attached : Example.xls
View 5 Replies
View Related
Oct 28, 2009
i have to clean a worksheet from duplicat rows. The list looks like:
A---------B-----------C
a---------s-----------b
a---------f------------b
a---------s-----------b
a---------e-----------d
a---------d-----------v
Those rows have to be deleted where duplicates exist in column A and C. In our example the first three rows would meet the criteria and two of them have to be deleted. Content of Column B has to be merged with ";" but without duplicates. The result would then look like:
A---------B-----------C
a---------s;f----------b
a---------e-----------d
a---------d-----------v
View 2 Replies
View Related
Jun 2, 2012
In a big data sometimes I have identical rows (maybe the 'Quantity' column has different value). I would like to merge them into one and add the quantities together. I have to use B and C (I need both) to find out if these rows are identical.
For example:
A1=date B1=111222 C1=ABCD ... and G1=quantity (1)
A2=date B2=111222 C2=ABC ... and G2=quantity (1)
A3=date B3=111222 C3=ABCD ... and G3=quantity (2)[code]......
View 3 Replies
View Related
Jun 26, 2009
In Column "C" there is a list of numbers ( these number realte to incidentsm and are called incident IDs) and I want to delete the rows that have duplicate incident IDs.
the row of numbers looks like this ....
View 9 Replies
View Related
Apr 8, 2014
I'm looking for a Conditional Formatting formula that will check two columns before highlighting the duplicate rows. I need it to be conditional formatting because I know nothing about writing macros or vba (what-ever that is?). Data is entered into Columns A, B, and C. I need to check both column A and C before it highlights the duplicates, based on those two columns. (The format only unique or duplicate values checks only one column.) I have attached an example, but this is just an example, as I have hundreds of lines to go through on the original. (For this example, Row 2 and Row 7 are the duplicates I need highlighted.)
View 3 Replies
View Related
Mar 28, 2014
I have a data set which has 6 columns (and lots of rows). Every row is different but I want to aggregate them based on 4 fields and then find the average of the numerical column for the results. I basically want to Group based on 4 fields and find the average of the 5th field.
My initial approach was to introduce a column which is a combination of the 4 fields I want to group by, simply in the Excel file (=A2&B2&C2&D2) and then find duplicates of that. I have a solution for this in VBA but when importing new data sets in this method is very slow, so I want to be able to do the whole thing in VBA.
View 9 Replies
View Related