SUM And DELETE Duplicate From Multiple Table To New Sheet With VBA MACRO

Dec 21, 2013

I have one sheet that have +/-5000 data in 4 table ... all table is fill with just only 2 column, first column is Code Number and second column is Quantity.

There are many duplicates of different entries in Column 1st in all table range and I need to add up their quantities to new table in new sheet...

This is for example:

(Sheet1 name="INPUT") (table1=A:B) (table2=E:F) (table3=I:J)
A B E F I J
AB123 100 ABC123 20 AA1 10
AC278 50 BCD547 30 AA2 10
AB123 30 FGE988 30 AB3 10
DE586 120 ABC123 50 AA2 10
RE158 80 BCD547 120 AA1 10
DE586 50 ABC123 70 AD4 10

Then I want to use macro vba to create new sheet(Summary Report),copy,paste,sort and sum all duplicate...

It should look like this

(Sheet1 name="Summary_Report")
A B E F I J
AB123 130 ABC123 140 AA1 20
AC278 50 BCD547 150 AA2 20
DE586 170 FGE988 30 AB3 10
RE158 80 AD4 10

View 9 Replies


ADVERTISEMENT

Macro To Detect And Delete Multiple / Duplicate Entries?

Nov 28, 2013

I need a Macro to do the following:

In column A I have a list of Acronyms from A2:A90000 and more

In column B I have the corresponding acronyms spelt out from B2:B90000 and more

When I run the macro, it shoud detect the multiple/duplicate Acronyms and it's corresponding descriptions, DELETE the multiples/duplicates and move the cells up.

View 5 Replies View Related

Delete Duplicate Rows In Table

Jul 6, 2007

I would like to achieve is a Yes there are Duplicates & NO there aren't any in Column H. If Column A,B,C,D & E ALL Match & there is another Row that Exactly Matches A,B,C,D & E Then Return a YES or NO in Column H. Though I DO WANT ONE ROW TO STAY as I will Delete the Rest of the DUPLICATES.

View 3 Replies View Related

Delete Duplicate Row Under Multiple Column

Oct 14, 2011

How do i delete duplicate row?

This is a sample of how my spreadsheet looks like. i want to check for duplicates under cell B:F. delete if duplicate. to like this: ( i know that in the second 4007 repair, there are some data similar to the first 4007 repair. but lets assume the data is different. Cause i cant change it now.)

cell A consist of my header and should not be shifted. i do not want a result like this,

The data should look like the original except the duplicates are deleted.

The macro should check until the row Period_name. that is anything after period name should not be deleted. Also i want Period_name row to be position under the leftover data. like this:

View 3 Replies View Related

Copy Sheet Then Delete Duplicate Rows

Jun 20, 2007

I have a worksheet that is composed a header row, and columns of data (client call results).
Each client is identified by a unique ID number in column A, a seperate column F has the 'call number, from 1 to x'.

So a client can have a single or multiple rows of data. Each client group of rows is sequenced with call 1 as line 1, call 2 at line 2, etc. etc. as your proceed down the rows.

The entire worksheet is already sorted (with a header row) ascending by client id and call #

What I want to accomplish is this

1 - copy the existing worksheet (CallRecords) to a new worksheet (CallToday)

2 - in the new worksheet, scan down (or up) from first data row (2) to the last row {ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row} and delete duplicate rows of the Client ID retaining the row with the max call number for that client id.

3 - sort the new worksheet (CallToday) ascending by column (G) date, and column (H) time.

View 6 Replies View Related

Delete And Sum Duplicate Rows With Multiple Condition

Oct 31, 2012

Here is the problem: i have two conditions to satisfy first is data from column A and second is data from column C, what i wanted to do is if both data from column A and B has the same other data in column A and C then sum the total in column D, F, I retain data for column B, E, G and H. Then delete the duplicate rows. By the way we also need to replace the remove the text (W1,W2,W3,W4 and W5) in column C.

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

Macro To Delete Duplicate Values But Keep Last One?

Dec 21, 2012

I am looking for some VBA code that will look through a column and delete all but the last duplicate value. The rows are not to be deleted. The duplicate also may not be consecutive (i.e they may appear in rows 2, 3 and 72 - the one in 72 would need keeping).

I did find the following macro which seemed to do the job until I realised it wasn't working if the values weren't consecutive.

Code:
Sub Dupe_Killer_Keep_Last()
Dim lrow As Long
Application.Calculation = xlCalculateManual

[Code]....

View 9 Replies View Related

Macro Delete Duplicate Data

Oct 27, 2008

I have an Excel Workbook with a Paid sheet and an Outstanding sheet both sheets have a File Number column.

I would like to create a macro that looks through the Outstanding sheet and if the File Number from the Outstanding sheet is also in the Paid sheet can the entire row be deleted from the Outstanding sheet.

View 9 Replies View Related

Macro That Delete Duplicate Dates

May 16, 2006

I use the following macro to delete the columns with duplicate dates in it. It works ok but when a date is duplicate more than once – say 4 time – it only delete 2 of the 4. I want it to delete all duplicates (entire column) and only leaf the last one to the right.

Sub DeleteExtraDates()
Dim c
For Each c In Selection
If c = c. Offset(0, 1) Then
c.EntireColumn.Delete
End If
Next c
End Sub

View 6 Replies View Related

Find Range And Delete Duplicate Value In Specified Column With VB Macro

Apr 21, 2009

See attached doc "Find and Delete.xlsx". Inside, the value in F12 is a very important cell. Using the text value from F12, I first want to use visual basic code to find the range in column B because it will vary. This means the 'text words' column might have 50 words or it might have 2000. I have racked my brain trying to find a universal way to find a variable range.

Then I would like to search for the exact text value within this range in column
B. For example, in F12 is the text word 'windows xp registry cleaner' and you can see that this value is in B9. There will only be one exact match in column B.

I then would like the vb script to delete and remove this found value, then move left one space in column A to also delete the ID number associated with the text word. Then shift both rows up to fill the empty gap. I have tried numerous different codes but to be honest, I'm not really sure what I'm looking for. I've tinkered with find and replace, vlookup, match, find, search, and many more.

View 2 Replies View Related

Speed Up Macro Code To Delete Duplicate Rows

May 2, 2008

I have a VBA Macro that loops through about 100,000 rows in an Excel file and removes rows that have a duplicate cell value. The macro takes about an hour and a half to run. Are there any ways to make the Macro run faster? Any ways in general to make VBA macros run faster?

View 9 Replies View Related

Excel 2010 :: VBA Code To Search Multiple Columns And Delete Any Duplicate Cells (not Rows)

Jun 12, 2014

My Excel program (Excel 2010) currently has several columns and each column looks for and pulls data from a specific file on my computer. Then I need to delete any duplicate data entries, count the number of unique entries and track the changes through a chart. I have everything done except I cannot figure out (or find on the internet) a way to search in multiple columns (more than 2) and delete just the duplicate cells. I want to delete the cells in a way where there is one left. For example if the code 12gf is duplicated three time, I want to be left with one 12gf (it doesnt matter what column the original one is left in). Additionally, column length changes and they are not sorted. I have attempted to attach an image of an example file below.

View 14 Replies View Related

Macro To Delete An Entire Row If A Duplicate Entry Appears Only In A Certain Column.

Feb 20, 2009

Is there a macro to delete an entire row if a duplicate entry appears only in a certain column.

1. Look for the column header with the name "File Number"
2. Anytime the same number under the "File Number" column appears more than once in that column, keep the row that contains first occurrence of that number buy delete the entire row anytime that number is repeated in another row in that same column.

This is regardless of what is contained in the other columns. For example..let's say these cells contained this data...

B1 - UTE00225
B2 - UTE00546
B3 - UTE65513
B4 - UTE00225
B5 - UTE00225

In this case, I would want to keep rows 1, 2, and 3. But, I would want to delete rows 4 & 5 because the number "UTE00225" has already appeared first in B1. I'm using Excel 2003.

View 2 Replies View Related

Consolidation Sheet Without Any Duplicate - Lookup Multiple Values

Sep 18, 2013

I have a list of ID's but in the same list there are duplicates, then I have my consolidation sheet without any duplicates, my issue is that I need to have the contents of a different column for each of the ID's.

Data sheet example

Column A (ID) | Column D (Result)

1111 first
2222 other
1111 second
3333 another test
2222 other two's
1111 third

Consolidation sheet

Column A (ID) | Incident 1 | Incident 2 | Incident 3

1111 first second third
2222 other other two's
3333 another test

Is there any formula/vba which could perform something similar?

View 3 Replies View Related

Macros To Delete Entire Duplicate Row For Duplicate Values?

Aug 19, 2014

I have a worksheet that has 3 duplicate values in a particular column, I need a macros that will highlight two of the duplicates row and then another macro to delete the entire row. The duplicate element are in column R. find attached worksheet.

Copy of OCL 2010 (3).xlsx‎

View 1 Replies View Related

Delete Duplicate Rows :: Duplicate Company Names

Dec 11, 2008

I have a spreadsheet with 3300 rows. In column A there is a list of company names and in column H there is a corresponding Sales Rep name.Column A has many duplicate company names. I would like to run a macro that will find the a company name and then delete all the rest of the rows that contain that same company name.

Attached is a sample of that spreadsheet.

View 5 Replies View Related

Delete Duplicate Cells Or Rows With A Duplicate Cell

Nov 1, 2007

I feel as though I have spent enough time searching the previous posts to ask this question.

I have a 4 column sheet, column B has many cells with identical data. I want to delete all the rows that that have duplicate data in column B.

COLUMN A= Car Makers
COLUMN B= Models of cars
COLUMN C= color
COLUMN D= owner

I want to end up with rows that each contain unique info in COLUMN B.

View 9 Replies View Related

Sum Duplicate Values Then Delete Duplicate Rows

Jan 5, 2004

I have 4 columns in my spreadsheet. I am trying to find any duplicates that may exist in Col A, sum values in Col D, then delete the entire row. So far my sheet before I run my vba code is this.

Col A
100
101
102
105
100
101
102
105

Col D
5
4
2
4
1
2
3
1

After my code is run, I need for my spreadsheet to look like this

Col A
100
101
102
105

Col D
6
6
5
5

I have some code but I still need to do a considerable amount of tweaking to it. Currently my code is only deleting the duplicate values in Col A. I am having difficulty summing the values in Col D as well as deleting the entire row.

Here is my code thus far....

-------
Public Sub FindDuplicates()
For RwCnt = 1 To (Worksheets(1).Cells(65536, 1).End(xlUp).Row)
SrchValue = Worksheets(1).Cells(RwCnt, 1).Value
If Len(Trim(SrchValue)) > 0 Then
With Worksheets(1).Range("a1:a" & Cells(65536, 1).End(xlUp).Row)

[Code]....

View 9 Replies View Related

Sum Duplicate Values Then Delete Duplicate Rows

Jan 5, 2004

I have 4 columns in my spreadsheet. I am trying to find any duplicates that may exist in Col A, sum values in Col D, then delete the entire row. So far my sheet before I run my vba code is this.

Col A
100
101
102
105
100
101
102
105

Col D
5
4
2
4
1
2
3
1


After my code is run, I need for my spreadsheet to look like this
Col A
100.........................

View 9 Replies View Related

Macro Delete Page (delete A Sheet In A Macro But When I Run The Macro)

Jun 19, 2009

I want to delete a sheet in a macro but when I run the macro, I always get a message warning and I have to answer the msg box to delete the page. Below is the macro command I am using.

Sheets("Tel").Select
ActiveWindow.SelectedSheets.Delete

View 4 Replies View Related

Macro To Copy Duplicate In Column And Paste In Another Sheet With Its Corresponding Row

Mar 12, 2014

I am searching for a macro that will find duplicate value in row A2 (id) then copy its corresponding column to a new sheet.. please refer to my attachment, and see the result i want on sheet2 and sheet3

Sample.xlsx‎

View 3 Replies View Related

Add Or Delete Rows From Multiple Sheets Based Table Range

Aug 14, 2009

I have a need to add or delete rows from a number of known sheet names using a table of variables on another sheet that tell me the start row of the sheet I need to go to and the number of rows I need to either add (ie copy rows and paste / insert these) or delete (delete rows).

There are multiple blocks of data I mey need to amend on each sheet and the values in my table of variables will change on each iteration (ie if I delete rows from the first block on a sheet, the start row for the 2nd block I need to amend will need to be updated in the table of variables before I can edit the 2nd block on that sheet).

I have been able to get the process to work for a single instance (ie one sheet and amendments to the first block of that sheet) but I can't figure out how to create the loop to elegantly move to the next set of variables and repeat the process for the 2nd, 3rd, 4th block etc on the first sheet and then move to the 2nd sheet to repeat the process etc.

Public Sub EditCurrentBlock()
Dim rowcount As Integer
Dim startrow As Integer
Dim endrow As Integer
Dim rowcountBal As Integer
'Dim selSheet As Worksheet (tried to use this to nominate the sheet variable but
' had problems so scrapped it)

'Reconfigure the GP Revenue block.................

View 2 Replies View Related

Run Macro To Delete All Rows (except For First 2) In A Table?

Apr 30, 2013

I need to run a macro to delete all the rows (except for the first 2) in a table. The table is named "Table1". The problem is the tables size is always different. Is there a way in VBA where I can resize the table to the original size?

View 2 Replies View Related

Macro To Delete Blank Rows In A Table

Sep 14, 2012

I recently found this macro on these forums for deleting rows where all of the cells are empty.

Code:
Sub RemoveEmptyRows()
On Error Resume Next
With Range("B300:B1000")

[Code]....

View 9 Replies View Related

Input In Cell Triggers Macro To Create Duplicate From Template Sheet And Rename?

Jan 22, 2014

I am currently doing an excel database of students application. I want a macro that creates a duplicate of a template sheet and renaming it based on the name of the student. Meaning once a name appears in the name cell, a sheet of that particular name is automatically created. At the same time, i want all the data regarding the applying student to appear the newly created sheet as shown in the attached file.

View 4 Replies View Related

Macro Delete The Sheet And A New Sheet Created

Jan 1, 2008

I have a sheet that I will activate by clicking on the tab.
In that sheet I have a code Worksheet_Activate / Call Summary / End sub

The problem is that the macro Summary this sheet get deleted and a new sheet
created,so I can use only one time this Worksheet_Activate.

View 9 Replies View Related

Multiple Sheet Compare And Delete

Nov 2, 2009

I have several (Child) sheets of data which I need to compare to a (Parent) master sheet. If a cell in column "A" on a child sheets matches a cell in column "A" on the parent sheet, I need the row on the Parent sheet deleted so in the end, only the rows with no Child matches are left on the Parent sheet.

View 4 Replies View Related

Excel 2003 :: Macro To Delete Rows In A Table

May 19, 2013

a VBA problem I have and I do not know how to solve. I use Excel 2003.

I have a workbook with a table; all cells except the table area are locked so at users cannot add any data. The table is on D2: H?. The workbook is password protected (users can only "Select unlocked cells", "Format cells" and "Sort"), and for that reason there is a "Add Rows" macro button so they can add more rows if necessary. It works well.

There is also a "Delete Rows" button, but it does not work as I want it to do. If the table is for example on D2:H4, and I select a cell on row #3 (ex. D3, or E3, or H3) and click on the button it deletes row #3, if I click on the button again it deletes row #4, and if I click on the button again it also deletes row #5 and so on, but it should not do it because all rows below row #4 are locked and should not be deleted.

I found on the Internet a code that I modified, but I do not get it to work. Below are the two macros.

My original macro (it deletes even locked rows):

Sub DeleteRows()
'
ActiveSheet.Unprotect Password:="123"
'
Selection.EntireRow.Delete
'
ActiveSheet.Protect Password:="123", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowSorting:=True
End Sub

The macro found and modified (the original rows are commented):

Sub DelRows_2()
Dim rngDelete As Range
Do While rngDelete Is Nothing
On Error Resume Next

[Code]....

View 2 Replies View Related

Macro To Send Multiple Emails To Multiple Recipients With Standard Message As Per Spreadsheet Table

Feb 18, 2014

get the code for sending multiple emails as per the spreadsheet list. Assume the spreadsheet has 100 line items and each columns specifies the name of the person, value, recipient email address ("To" and "CC") and sender name.

And the Body of text is :

Hi "Name of the person" Please find the value of "Value" to be paid for the moth of xxx and kindly let me know for further clarification.

View 1 Replies View Related







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