+ Reply to Thread
Results 1 to 16 of 16

Need to extract data from other sheet based on Name, Date & Time range to avoid duplicates

  1. #1
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Need to extract data from other sheet based on Name, Date & Time range to avoid duplicates

    Hi Experts,

    I am currently using Countifs function to extract data from Raw sheet to Task manager sheet based on Name & Date. But doing so, I am getting the duplicate data since at numerous occasions I have same worker working for the same date but at different time slots.
    Now, to avoid duplicates & create the productivity dashboard I am looking to extract data with Time range added so that I can get the correct data.
    I am attaching both Raw data & Task manager data sample.
    Your help will be much appreciated.
    Regards,
    Varun
    Attached Files Attached Files
    Last edited by varunistician; 04-06-2021 at 06:52 PM.

  2. #2
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Hi All,

    I have updated the new excel sheet with the Coutifs function that I am using & have highlighted the duplicate values that I am getting.
    Attached Files Attached Files
    Last edited by varunistician; 04-07-2021 at 04:35 AM.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    1. A sample sheet should consist of 10-20 rows (max) not 3000.

    2. Your sheet shows a whole load of error messages in column J, where (I presume) the formula is meant to be... There are links to an external worksheet that we don't have.

    3. I can't see anything highlighted. I can't see any manually calculated rexpected results.

    Please re-read the yellow banner (top) and post a properly annotated SAMPLE sheet.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Hi Glenn,

    Please see the new sheet attached with data & expected result. & also Countifs function that I am currently using.

    Regards,
    Varun
    Attached Files Attached Files

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    J37 to check dupplicate from J38, if there were, zero, else, counting.

    Please Login or Register  to view this content.
    Drag down (or maybe up)
    Quang PT

  6. #6
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Hi Bebo,
    I want the data to match between the time range of the Sheet 1 to the Data'21.

    Since this only example, thats why I havent uploaded the whole sheet.

    Your help will be much appreciated.
    Regards,
    Varun

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    There's still something wrong with your description:

    =IF(COUNTIFS(B$5:B6,B6,C$5:C6,C6,D$5:D6,D6)=COUNTIFS(B:B,B6,C:C,C6,D:D,D6),COUNTIFS(Sheet1!A:A,[@Date],Sheet1!C:C,[@[Workers Name]]),"")

    see pink cells on sheet. Activity is not recorded on sheet 1.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Hi Glenn,

    The only Activity that I am looking for is Put away Containers to match with Name, Date & specifically time range from Sheet1 to Data'21.

    Time range in Data'21 is primary & need to get the results based on that to Sheet 1. Hopefully I am not confusing you.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Which "Put away Containers". There are two sub-types.

  10. #10
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    HI GLENN,

    Please see attached, I have uploaded again, apologies if my uploaded file wasnt correct before.

    Regards,
    Varun
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Try this. It seems OK now.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Hi Glenn,

    It is ok but I need to get the results using time range as well. Purely because of the reason, I need to produce the productivity chart using these results so that I can see Mr x worked between 11:00 AM to 12 PM at put away containers & qty was 35 & then again worked at Put away containers between 2 PM to 3 PM & qty was 62 then I need to figure out why the productivity was low during first hour.
    Thats why I need the time function in there using the Sheet 1 time & comparing it against the Data'21.
    Please let me know if I have explained it properly.
    Regards,
    Varun
    Attached Files Attached Files
    Last edited by varunistician; 04-08-2021 at 05:38 PM.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Now I am completely confused.

    Your "sample" sheet is a mess. There are time values in columns E & F. There is no indication what these represent, as for Yourda Monika NONE of the 90 records in the raw data (11:20 & 11:46) fall inside EITHER of the time windows. Yet you expect 0 as the answer to appear, as if by a miracle, in the second instance (row 46) which might/might not ... as no explanation was given...) run from 14:37 to 17:57.

    We want a sample sheet, one that YOU have put a bit of time into thinking about. Simply regurgitating 14,000 rows of raw data with a results sheet that doesn't reflect your data just is simply inadequate.

    I am more than happy to continue here, but NOT with this sheet.

    Please read the yellow banner (top) again. Here is a suggestion. 20 rows of raw data from no more thna 2 individuals covering anomore than two time periods and a result sheet showing your (manually calculated) expected results.

    Provide a sensible, structured, labelled sample and I'll help. Otherwise, I'm out.
    Last edited by Glenn Kennedy; 04-08-2021 at 02:55 AM.

  14. #14
    Registered User
    Join Date
    02-08-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Hi Glenn,

    Please see the latest attached sheet.

    Since you didnt want many rows, I have used only 2 rows as an example in Data'21 sheet & only the respective times of scan that he did in Raw data sheet.

    You will find that data in images shows 178 but really it should be 55 in first row & second row should show 123 if we use NAME, DATE & Time range correctly.

    but since I have used only NAME & DATE range I am unable to get the desired result & tried multiple times using time but with no luck.

    Hopefully this time I have uploaded the workable data & explained clearly.

    Regards,
    Varun
    Attached Files Attached Files

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Going to Zzzz now. I'll check it over in our am.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Need to extract data from other sheet based on Name, Date & Time range to avoid duplic

    Half-way there. (With a little embarassment), I think you have oversimplified the sheet (sorry!!). This works fine for your sample:

    =COUNTIFS(Table2[Date],[@Date],Table2[Column3],[@[Workers Name]],Table2[Start Time],">="&MOD([@[Start Time]],1),Table2[Finish Time],"<="&MOD([@[End Time]],1))

    However... in your first sheet there seemed to be multiple instances of the "correct" answer. If that is stillt he case, then (ummm) upolad a problem sheet and I'll take another look. However, for what you have currently submitted, this is OK.
    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. [SOLVED] Macro to extract data based on date range and values
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 05-08-2020, 10:44 AM
  2. Extract Data from multiple sheet to find duplicates
    By simran555 in forum Excel General
    Replies: 7
    Last Post: 09-09-2019, 10:09 AM
  3. Replies: 2
    Last Post: 10-18-2017, 02:12 PM
  4. Replies: 4
    Last Post: 10-16-2015, 12:59 PM
  5. [SOLVED] Avoid Duplicates Entry on Pasting Data from one sheet to another sheet
    By chergian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2014, 03:33 PM
  6. [SOLVED] SUM data in column based on Date/Time range
    By t.jones in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2013, 06:43 PM
  7. extract data by date range and place in different tabs based on name
    By Sway1978 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2013, 03:35 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