Results 1 to 2 of 2

Find duplicate cell, insert row below, calculate VBA

This is a discussion on Find duplicate cell, insert row below, calculate VBA within the Excel Questions forums, part of the Question Forums category; Greetings, After searching the forum, I cannot locate anything similar to this scenario, so here it is: 1. Locate duplicate ...

  1. #1
    New Member
    Join Date
    Jan 2013
    Posts
    1

    Default Find duplicate cell, insert row below, calculate VBA

    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.

  2. #2
    Board Regular
    Join Date
    Sep 2012
    Location
    Melbourne Australia
    Posts
    1,306

    Default Re: Find duplicate cell, insert row below, calculate VBA

    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:

    Best VBA beginners book
    Good Excel VBA books for beginners?

    Best of luck
    Write a man a macro he is happy for the day....teach a man to write a macro, he'll be happy forever!

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com