Find duplicate cell, insert row below, calculate VBA

BanaBrian

New Member
Joined
Jan 23, 2013
Messages
1
Greetings,
After searching the forum, I cannot locate anything similar to this scenario, so here it is:
1. Locate duplicate part numbers (Column C).
2. When identified, insert a blank row below
3. Copy cells above blank cell in Columns A, C, D, and E
4. Concatenate the two cells above blank cell in Columns B and F with " / " between
5. Sum the two cells above blank cell in Columns G, H, I, L-BI
6. Calculate blank cells in Columns J and K (Ex. I4+H4-G4)

The attachment has the before and after scenarios.
Thank you very much for your consideration and I look forward to hearing from the resident VBA experts.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
For the duplicate side of things if the data is in order, you can pick a column, and use:

=if(A1=A2,1,"")
Run that down (Autofill Down)

if it's not in order, then use:

=if(countif(A:A,A1)>1,1,0)


That will make it easy to identify where you need to act. Everything that has a 1 is a duplicate.

For the balance of the request, you could record the requirements in excel, and then replay it as required.

If you're not proficient in VBA code, then try this:

http://www.mrexcel.com/forum/excel-...visual-basic-applications-beginners-book.html
http://www.mrexcel.com/forum/genera...isual-basic-applications-books-beginners.html

Best of luck
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top