+ Reply to Thread
Results 1 to 8 of 8

Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

  1. #1
    Registered User
    Join Date
    07-01-2015
    Location
    Lafayette, IN
    MS-Off Ver
    2013
    Posts
    2

    Lightbulb Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    Hi there!

    I have attached a dummy workbook of what I'm trying to do. I have a raw data sheet that auto populates from an hmi database. On the raw data sheet, date & time are populated for every minute over the course of 30 days. For each date & time instance, a code runs (in the hmi) to see if any pieces of equipment have turned off or started back up during that minute timestamp. If a piece of equipment has shut off, it will say "start" under "Downtime Start", else it will say "no start". If the equipment comes back on during that timestamp, it will say "end" under "Downtime End", else it will say "no end". These columns can be sorted to find the desired information to populate the next sheet in the workbook via copy/paste, but with the large volume of data and equipment and time, it would be a lot easier if I could figure out how to write a formula for each piece of equipment to search the Downtime start column for the instances of "start" and the following column for the instances of "end" and populate the corresponding time stamps onto the second sheet. I think I may need another sheet to first collect the useful data separated by piece of equipment before populating it all into one sheet? Maybe not. I started to do this with a logical IF function but there's no way to skip over the data that doesn't meet the criteria, so I still end up with a list that needs sorted for true/false instances. Also, for a vlookup, it just returns the first instance from each column repeatedly. Please help!!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    Hi, welcome to the forum

    Maybe Im being slow today, but how do you arrive at the values you have in sheet 2?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    Okay, again, has to be an easier way but I did it with OFFSET and INDEX/MATCH
    First I separated Equipment 1 and 2 results into two tables
    So for Eq 1, the first start is easy. In A8
    =INDEX('Raw Data'!$A:$A,MATCH("start",'Raw Data'!B:B,0))

    In B8
    =INDEX('Raw Data'!$A:$A,MATCH("end",'Raw Data'!C:C,0))

    Now, in A9 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In B9 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The same for Eq 2 in columns E:G
    I added some more data on Raw Data to check it and it seems to work.
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    07-01-2015
    Location
    Lafayette, IN
    MS-Off Ver
    2013
    Posts
    2

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    FDibbins: I sorted the data using the filters at the tops of the columns and then copy/pasted the useful data into sheet 2. I'm looking for a way for this to happen automatically.

    ChemistB: This is helpful! But I am still going to have to figure out how to bring all the data from separate equipment together into 1 list.
    Last edited by Slanguell; 07-02-2015 at 01:54 PM.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    =INDEX($C$8:$C$22,MATCH($G2,$B$8:$B$22,0))

    Then, getting the instrument ID in I2

    =IF(ISNUMBER(G2),INDEX($A$6:$A$22, MATCH("Equipment*", $A$6:OFFSET($A$6,MATCH(G2, $B$6:$B$22,0),0))),"")
    See attachment
    You can put the individual tables on a different sheet
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    Okay, lost first half of my post.

    I had to do this in two steps (much like this post). I started where I left off in Post #3 except I placed the two tables on top of each other. Make sure you put enough rows in between for maximum up/down times. I also had to offset the equipment ID by 1 column to the left. (see attachment Post 5)

    I then created the combined table in columns F,G, H and I. In G2 copied down

    =IFERROR(SMALL($B$8:$B$22,ROWS($A$1:$A1)),"")

    In H2 copied down

    =INDEX($C$8:$C$22,MATCH($G2,$B$8:$B$22,0))
    Then........ see post #5

  7. #7
    Registered User
    Join Date
    08-25-2015
    Location
    Irvine
    MS-Off Ver
    2007
    Posts
    5

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    Hi everyone!

    I'm sure you get asked this often but I can't find what I'm looking for on the internet so I'm asking and yes I'm a new-be! No laughing

    I have a spreadsheet of 9 cells across A4 - I4 (white)and around 900+ down (but will be adding to this number and that's where you all come in...). It'a a list across of company names, legal name, street address, city, state, zip, phone numbers, website and business type. I want to be able to pick a cell like A3 (green) to entering all new info across then click a cell preferably A1 (blue) to be formulated to "Auto Sort" where it will put the row alphabetically down where it below...simple right? I worked off a spreadsheet at my previous job and can work within it, but have no idea how to create one?

    Can you help?

    NardiScreen Shot.jpg

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to Auto-populate Sheet from Raw Data by Searching Data for Repetitive Instance

    Hi Nardi.

    Unfortunately your post breaks one of the forum rules..

    2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread. You may include up to 3 links to other URLs in a single post, no more, so only link to the relevant pages.
    Please take a moment to read the forum rules (there is a link at the top of this page) and create your own thread, linking back to this thread if you feel that it is relevant.

+ 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. [SOLVED] How can I conditionally auto-populate data to another sheet?
    By Setheroth in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-15-2015, 01:23 PM
  2. Replies: 14
    Last Post: 03-20-2015, 05:24 PM
  3. [SOLVED] VBA to Auto Populate the “AutoPopulate” sheet as data is being entered in EnterData sheet
    By bjnockle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-13-2014, 09:10 AM
  4. Auto-populate specific data from one sheet to another
    By arskiracer in forum Excel General
    Replies: 0
    Last Post: 10-17-2012, 10:27 PM
  5. Auto-populate specific data from one sheet to another
    By fowlspace in forum Excel General
    Replies: 4
    Last Post: 10-17-2012, 09:19 PM

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