You are here: HomeExcelTutorials
Facebook Twitter Reddit More...

Merge duplicate rows and sum one column - VBA code

Merge duplicate rows and sum one column - VBA code

Price: FREE

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=1122 C1=ABCD . and G1=quantity (1)
A2=date B2=1122 C2=ABC . and G2=quantity (1)
A3=date B3=1122 C3=ABCD . and G3=quantity (2)
A4=date B4=1122 C4=ABCD . and G4=quantity (1)
A5=date B5=2211 C4=ABCD . and G5=quantity (1)
And I would like to have my final date look like this:
A1=date B1=1122 C1=ABCD . and G1=quantity (4)
A2=date B2=1122 C2=ABC . and G2=quantity (1)
A3=date B5=2211 C4=ABCD . and G5=quantity (1)

Visit publisher's web-site: Merge duplicate rows and sum one column - VBA code

Category and Tags: ExcelTutorials :

Related Tutorials

Merge duplicate rows

Free: Yes
Tags: Excel ›

I have a duplicate rows and I want to merge the duplicate rows and have a single row instead.(i don't want delete process)
I have my excel sheet like this
A B
SNO NAME
1 CA
1 CA
1 CA
1 VA
1 VA
2 LONDON
2 LONDON
2 DURHAM
2 DURHAM
And my result set has to be like below (All the duplicates has to merge and the last row has to remain)

VBA code to Merge the repeated cells and sum the corresponding columns

Free: Yes
Tags: Excel › VBA

I am very new to VBA coding
I am trying to merge the repeated cells in column A and get the sum for the corresponding cells in the column B.The entire result should be displayed in sheet2
Example:
Sheet1
ColA ColB
now the result should be
Sheet2
ColA colB
Please let me know if you have any doubts in my explanation?
Please try to solve this!

Delete Duplicate Rows

Free: Yes
Tags: Excel ›

I'm trying to merge a new and an old dataset which have a lot of values the same but a few new updated ones, the values don't match on each row but if there is a duplicate value column K that matches a value in column A I need a way to delete the row of data attached to column A while leaving the column K value as is i.e. delete a-j but not the whole row.
Either VBA or a formula would help me out a lot.

How to insert duplicate rows

Free: Yes
Tags: Excel ›

Interesting scenario -
I have a spreadsheet with one column - 35,00 unique item numbers
Example:
item a
item b
item c
item d
item e
I need to duplicate each row - making a spreadsheet with one column 70,00 rows as such:
item a
item a
item b
item b
item c
item c
item d
item d
item e
item e
I tried a formula - couldn't come up with anything - looked for some kind of merge type functionality - did find anything.

Excel VBA - sum by category

Free: Yes
Tags: Excel › VBA

I want to create a code that looks through values in a column and sum values in different columns if a code exists more than 1 time in a range. Please take a look at the attached file.
What I want to do is look through column B and if the code exists in column B more than 1 time (in this case the value of 20 in cells B4-B6), sum values in Group A and Group B and put each total in cell F4 and G4. and then, sum values in cell F4 and G4 and multiply it by the value in D. in other words, =SUM(F4:G4)*D4 should go into E4.
And lastly, delete rows that contains same value as the first one in column B. in this case, remove rows 5-6.
it does sound a bit complicated, but would greatly appreciate if you could come up with something.

Related Applications & Scripts

Split Merge PDF

Free: No
Tags: Software › Excel PDF Generation

Split Merge PDF files with PDF splitter & Merger Software phenomenally combine pages from the input PDFs to create a new PDF and split a file in to single pages as well as multiple pages, small in size pdf files based upon the page ranges & page numbers. It is easier, simplest and light weight software that combines two or more Acrobat PDF files into a single PDF document. PDF Splitter and merger is software to split multi-page PDF document into single page PDF document.
Split Merge PDF is stand alone software which provides both facility splitting and merging. Merger function has capability to merge more than one file in to one PDF file and save it to user defined location. Splitter Function has ability to split one PDF file in to single page as well as multiple pages PDF document according to user requirement. Both functions have page range option which is used to merge or split page number. PDF splitter and merger don't need any software such as adobe acrobat. Software comes with graphical user interface so that any one uses this application with any help or any technical knowledge.

CD Duplicate Master

Free: No
Tags: Software › Excel Multimedia

CD Duplicate Master, a powerful CD duplicate utility, is designed to fit for CD duplicate fan's need. It can enables you to extract digital audio tracks from an audio CD into sound files on your hard disk; burn audio CD, data CD to blank CD disc, and data files to the ISO image file; copy all kinds of CD disc; and erase a rewritable CD-ROM content. It still can grab audio tracks from a CD and save them to your hard drive in various audio formats, like MP3, WMA, OGG and other, and create custom audio CD from MP3, WAV, OGG and WMA files. It is the best choice to backup CD disc!

Video Converter, Spliter, Merger

Free: No
Tags: Software › Excel Video Converter

Video Convert/Split/Merge Studio can burn, capture, convert, split and merge: AVI, MPEG, MPEG 1, MPEG 2, MPEG 4, VCD, DVD, VCD, RMVB, RM, WMV and any most used video formats. It is a home video software to realize requirements of watching at home theater or storing in PC. It is compatible with DVD/VCD/ SVCD burning. It is easy-in-use, only in 4 steps to burn, convert, capture, split or merge movies.

Compare and merge text and image files

Free: No

ECMerge compares quickly using multi threaded comparison engine. It determines precisely the difference between text files, images and folders.
It formats XML files for a better presentation and differentiation. The differences inside lines and the syntax colouring for numerous languages save you a great amount of time.
It compares not only the files with an ancestor, but as well folders: this is unavoidable when using heterogenous SCC or when your SCC does not save latest ancestor information.
The text files merge / reconciliation is fast and secure and automated.
The numerous options available in the contextual menu save you from the error prone process of typing text. When necessary, editing supports unlimited Undo/Redo.
It compares Microsoft Word, OpenOffice Writer and RTF with no third party software: on all platforms.
ECMerge accesses not only files over FTP/FTPS, on your computer or local network, but as well directly within your source code repositories in your SCC / SCM.
This access is already available for: CVS, SubVersion, Perforce, Visual SourceSafe, Mercurial, Darcs, Git, Bazaar. Checkout is also proposed for Code Co-op.
Archives converters are as well available and let you compare content of archives files

JQuery AdDelFields: duplicate or delete fields within a form

Free: No
Tags: JavaScript › Excel Forms jQuery

This plug-in is very useful for those who need to duplicate or delete fields within a form.
WHAT DOES :
1) You insert the form inside a div (container) that has a specific class eg. (Class = contenitore_input)
2) il div con classe contenitore_input verr chiuso in un ulteriore div con un id specifico es:.(id=contenitore_generale)
3) the div with class contenitore_input will be closed in another div with a specific id eg. (id = contenitore_generale)
4) assign a reference attribute to each field to be duplicated eg. &lt input alt=nome &gt

© 2014 Contact us - Privacy Policy - Terms of use - Add Listing