Results 1 to 13 of 13

Macro to check data for matches and return a difference

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Jacksonville, Fl
    MS-Off Ver
    Excel 2016
    Posts
    355

    Macro to check data for matches and return a difference

    Hello everyone,

    I'm working with a large quantity of data that needs to be analyzed by time. My data is inputted into excel through SAP and comes in very sloppy. I created a macro to clean up then data. I need help creating a macro that search for certain conditions of the data and return a value. I'm going to do my best to explain what I'm trying to accomplish but I've also attached a sample of what I would like the macro to do to a range of data.

    1) Find the row titled "Status" and then check each column that says "Complete" and "Pending" (no particular order of which comes first) that also have matching values in the "Order" and "Footage" row.

    2) If the first condition is true then take the value from the "Operation" column (using the same column that was "Completed") and subtract 20 from that value.

    3) Search for said value in the "Pending" column under the "Operation" row.

    4) Then subtract the "Time" ("Completed") from the "Time" ("Pending") and place result next to the "Completed" column in the "Time Difference" row.

    My sample workbook shows the end result (minus the fill colors).

    This is something way out of my depth but I can't think of a better way to get the numbers I need.

    Anyone willing to take a look at this for me would be my hero!

    Thank you,

    -Justair

    This is a similar question that I have received help with before but a lot of the criteria is different. Not to mention the macro that I received before worked great as long as the data was structured in a very specific way.
    With my new data that's not possible so I'm requesting help considering the new conditions.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. lookup formula to return data where column header matches
    By tim-harrison in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-06-2013, 12:58 AM
  2. [SOLVED] Need a Formula to return a list of data that matches 3 criteria in seperate columns
    By JDUBS1080 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-23-2013, 01:06 PM
  3. [SOLVED] Macro to check row's text colour and if text in below rows matches
    By Raulus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-22-2012, 06:28 AM
  4. [SOLVED] Macro required to find matches and return value in the next column.
    By excelvba123 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-09-2012, 03:33 AM
  5. Check each row, if each proceeding row matches, take data and put in required field t
    By mattsmithnl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2011, 03:27 PM

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