+ Reply to Thread
Results 1 to 4 of 4

VBA to find matching criteria, insert row, and add items

  1. #1
    Registered User
    Join Date
    05-01-2021
    Location
    Oklahoma
    MS-Off Ver
    Office 365
    Posts
    1

    VBA to find matching criteria, insert row, and add items

    I am trying to create a macro where it will insert rows and add that group when a condition is met. I am still new to Macros and cannot seem to get it to insert the rows properly. I have attached an example workbook. Sheet 3 is how it is supposed to look at the end. Since I'm new, I don't care about pretty, just functional.

    Here are the conditions:

    If column C "Transaction Date/Time" is more than 90 seconds difference to the cell below, insert a row AND add column E (Ticket Amount);
    If column A "Kiosk Name" is different than the name below it, insert a row AND add column E (Ticket Amount).

    I have a Macro on that book that highlights the different cells that need to have rows inserted, but I could not get it to insert a row.
    Attached Files Attached Files
    Last edited by Slevelneves; 05-03-2021 at 10:42 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: VBA to find matching criteria, insert row, and add items

    Try

    Please Login or Register  to view this content.
    Last edited by maniacb; 05-02-2021 at 01:22 PM.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA to find matching criteria, insert row, and add items

    See next code
    Adjust Gap = 190 to your need
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: VBA to find matching criteria, insert row, and add items

    Slevelneves,
    For the bulky data.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find row matching two criteria
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2020, 04:48 AM
  2. Find matching items in different documents
    By leoris in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2019, 11:26 AM
  3. [SOLVED] Have excel find matching items from different worksheets and apply price
    By BXWRebuilders in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-12-2012, 07:48 PM
  4. How to insert additional matching criteria to Index
    By erumhyder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-26-2011, 02:07 AM
  5. Looking for Formula To Find Multiple Matching Items
    By marcflood in forum Excel General
    Replies: 3
    Last Post: 03-05-2011, 02:37 PM
  6. Need formula that Counts items matching criteria using two columns
    By Juana Cafe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-03-2006, 04:45 PM
  7. Find Count of Items with certain criteria
    By Tucson Guy in forum Excel General
    Replies: 3
    Last Post: 01-01-2005, 11:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1