Duplicate Rows Based On Number In Text

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


ADVERTISEMENT

Conditional Formula Based On Another Cells / Rows Text / Number?

Jan 25, 2013

I am wondering if I could have a formula be used against a certain row/cell containing a certain "phrase" or "number" for instance

I want E1 to read something like this = (row containing item "FF32105") (the given row from the previous statement) ( the input column ex. B) (the input value ex. *6)

Essential I want to be able to copy and past a sales forecast and have the formulas automatically (listed below the pasted forecast) calculate purchase needs. The issue is that if our forecast one month has a certain item and then the next does not then they will end up on different lines after the copy/paste. We have over 500 items so a manual adjustment would be time consuming..

Is there a possible way for the formulas to "find" the correct line to start calculating data?

View 6 Replies View Related

Keep ONLY Duplicate Matter Number Rows

Oct 15, 2008

Is there a way to delete any rows that don't have a second occurrence of any cell in column a? I have unique numbers ONLY in column A. I want to tell Excel to.

a) Look at all the cells in column A ONLY (about 6,000 of them).
b) Look for any cells column a that have a duplicate entry in another cell.
c) Delete all rows that don't have a duplicate cell in column a.

This would be the entire row that I would like deleted. So every row should now only have the header info followed by 2 identical cells in column A. NOTE THAT THE OTHER COLUMNS WILL HAVE DIFFERENT INFO IN THEM, WHICH I WANT TO KEEP. I ONLY WANT THE CELL IN COLUMN A TO MATCH.....

View 2 Replies View Related

Remove Duplicate Rows Based On Col C

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

Excel 2007 :: Count Number Of Duplicate Rows With Two Columns?

Jun 3, 2012

I want to count the number of duplicate rows where the exact text in columns A and B match. An example is as follows, where column C would be the desired result. Note that there are hundreds of different text values of column A and hundreds of column B, I just simplified the example.

Excel 2007
ABC1AX72AX
3AX
4AX
5AX
6AX

[Code] ......

View 9 Replies View Related

Delete Duplicate Rows Based Only 2 Columns.

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

Remove Duplicate Rows Based On Dates?

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

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

Create Duplicate Rows Based On Value In A Column

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

Duplicate Rows Based On Cell Count?

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

Adding Two Cells / Different Rows Based On Duplicate In Third Row

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

Duplicate Rows Based On Cell Contents?

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

Delete Duplicate Rows Based On All Columns

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

Highlight Duplicate Rows Based On 1 Column

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

Duplicate Rows Based On SUM Of Cell Values

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

Delete Duplicate Rows Based On 1 Column

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

Count Highest Number Of Duplicate Text Entries In Range

Nov 2, 2011

I have a column that is filled with different names. Some names appear more than once. There is one name in fact that appears four times.

I am looking for a formula, or VBA if that's necessary, that will look through the range Y2:Y50, and return a value of 4, because the person that has the most duplicates, her name appears 4 times.

If everyone's name appeared only once, except for a person whose name was in that range twice, then the formula would return a 2.

View 6 Replies View Related

Append Text In One Cell And Delete Duplicate Rows

Jul 14, 2009

I have data that covers multiple rows that I need to merge into one row.

Header:| InvoiceNumber | Type | Name
Row1: | 1000 | Payor | Doe, John
Row2: | 1000 | Payor | Smith, Mary
Row3:| 1000 | Payee| Jones, Henry
Row4:| 1000 | Payee | Jones, Bob

I need to get those four example rows down to one row such as:

Header | InvoiceNumber | Payor | Payee
Row1: | 1000 | Doe, John & Smith, Mary | Jones, Henry & Jones, Bob

The number of payor/payee can vary between 1 and several. I need some way to loop through and keep appending the names in one cell separated by a "&". And then deleting all the duplicate rows (based on InvoiceNumber).

View 9 Replies View Related

Deleting Duplicate Rows Based On Cell Values

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

Concat Rows Based On Duplicate Data & Delete

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

Insert Duplicate Rows Based On Numeric Value In Column

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

Excel 2007 :: How To Duplicate Rows Based On Cell Value

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

Conditional Formatting - Duplicate Rows Based On Multiple Columns?

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

Finding Duplicate Rows Based On Values In Multiple Columns?

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

Macro That Merges Duplicate Rows Based On Unique Values

Jan 27, 2014

I have a spreadsheet that lists employees and their certifications. If an employee has multiple, then they will show up on as many rows as they have certifications.

The macro I have merges them into one row with a line break, but only the first column's unique value has been merged while the other columns containing their own unique values are duplicated when I want them to show up only once. Example: Jane Doe shows up 2 times on the report. Her name should only show up once on the row, not 2 times with a line break.

Here is the code. I have also attached an example of what I need. Because the attachment is a simpler version of the actual report, is it possible to specify which rows have the unique values and which ones don't?

View 2 Replies View Related

Delete Duplicate Rows Based On Cell/column Values?

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

Deleting Duplicate Rows Based On Earliest Or Latest Time?

Mar 19, 2014

Below is an example of an Excel sheet I'm working with: [URL]

Basically, I'm trying to delete the duplicate rows by matching ID, Date and Type. If ID, Date and Type are the same, then, I want to only keep the record with the earliest Time in case of Type = In and the latest Time in case of Type = Out.

So, for example, in the case of ID = 1, there are 3 records for In, I only want to keep the one where Time is: 8:01 as this is the earliest. The other 2 records should be deleted.

Similarly, in the case of ID 3, I want to keep the record where Time = 18:05 as this is the later time out of the 2.

Can this be achieved by Conditional Formatting or Macro or VBA?

View 1 Replies View Related

Delete Duplicate Rows Based On Multiple Cell Criteria

Apr 21, 2007

I have some VB code, courtesy of OzGrid and Davc4, that works well to delete duplicate rows based on criteria in Column A of the active worksheet (albeit a bit slow on large files).

How do I modify the code below to evaluate duplicate data in Columns A through D? .....

View 7 Replies View Related

Excel 2010 :: Delete Duplicate Rows Based On Values Of Cells

Jun 17, 2014

I'm new to VBA and macros, using Excel 2010, and am trying to figure out how to delete all duplicate rows in a sheet where 2 or less of their values in column A is "1". I'd like have a script that is flexible enough to change to 3 or less if need be. I also have a header row that needs to be offset in the process.

A---B-
0--123 <-delete
0--123 <-delete
0--123 <-delete
1--123 <-delete based on this the value of column A
0--123 <-delete
0--123 <-delete
1--321
1--321
1--321
1--321
1--321

or

A---B-
0--123 <-delete
0--123 <-delete
1--123 <-delete
1--123 <-delete based on this the value of column A
0--123 <-delete
0--123 <-delete
1--321
1--321
1--321
1--321
1--321

View 5 Replies View Related

Excel 2010 :: Extend Rows Based On The Number Of Rows In Another Sheet

Jun 16, 2014

calculate the number of full rows in one data base located on one sheet X to determine how many rows the macro needs to extend on sheet B (sheet B is made only of formulas for data interpretation in sheet A.

View 14 Replies View Related







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