+ Reply to Thread
Results 1 to 18 of 18

Using a data table to replace time values with points values.

  1. #1
    Registered User
    Join Date
    02-02-2022
    Location
    Leyland, England
    MS-Off Ver
    2019
    Posts
    6

    Using a data table to replace time values with points values.

    Hi
    I need a formula that will insert a points value into a cell when a time value has been input in another cell.
    Production workers log their time spent using up to 5 different machines in a working day and I have to calculate their exposure points.
    On the attached spreadsheet I have a data table for the values and a timesheet for a worker.
    The values that are showing in the ELV(400pts max) row are manually calculated from the data table, where multiple time values are input, the points are cumulative and this is where I need your help please.
    Can anyone please write me a formula that will do this?

    Your help and advice will be much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,465

    Re: Using a data table to replace time values with points values.

    Welcome to the forum.

    Where do you want these values? Which data does the formula need to look at?

    Where have you manually mocked up some examples?

    Bit of a needle in a haystack ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  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 2406
    Posts
    44,662

    Re: Using a data table to replace time values with points values.

    1. Change the values in column A to match data... exactly.

    2. Dump the merged cells in row 8.

    3. This works in my version of Excel... but may fail in yours. We'll see. In B8, copied across:

    =IF(B$2="Hrs",SUM(IFERROR(INDEX(Data!$B$2:$AO$6,MATCH(Demo!$A3:$A7,Data!$A$2:$A$6,0),MATCH((B$3:B$7+C$3:C$7/60)/24,ROUND(1440*Data!$B$1:$AO$1,0)/1440,0)),0)),"")

    You seem to be using an older version of Excel than me. So, please refer to the attached file. If the formulae are enclosed within a pair of { }, these are array formulae.

    These are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see the curly brackets { } appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    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

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,465

    Re: Using a data table to replace time values with points values.

    No idea how Glenn managed to work out what was required - he must have psychic powers that I don't possess.

  5. #5
    Registered User
    Join Date
    02-02-2022
    Location
    Leyland, England
    MS-Off Ver
    2019
    Posts
    6

    Re: Using a data table to replace time values with points values.

    HI Glenn,
    Firstly, thanks for your efforts with this.
    I've had a play with your formulaed spreadsheet but unfortunately it doesn't want to work properly on my 2019 excel.
    I've input various other time values into the cells but it wont add up cumulative ELV points values, it just gives me a singular value.
    Any ideas please?

    Rob

    ps. you'll gather by now that my Excel knowledge is positively infantile!

  6. #6
    Registered User
    Join Date
    02-02-2022
    Location
    Leyland, England
    MS-Off Ver
    2019
    Posts
    6

    Re: Using a data table to replace time values with points values.

    Ninja springs to mind, but I appreciate your involvement.
    Rob

  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 2406
    Posts
    44,662

    Re: Using a data table to replace time values with points values.

    This is actually very worrying. I have seen this before. It LOOKs like it's working... it returns a number, not an error... but the number is derived only from the first time value it sees. I had a vague memory in the back of my head, that this might happen, hence my comment about it possibly not working for you.

    I wonder how many bridges have collapsed, or companies gone bust because of this aberrant behaviour. All I have to do now is remember HOW to fix it!!

  8. #8
    Registered User
    Join Date
    02-02-2022
    Location
    Leyland, England
    MS-Off Ver
    2019
    Posts
    6

    Re: Using a data table to replace time values with points values.

    My world is relying on you Glenn! Seriously, I do appreciate your efforts with this, it's way beyond me.

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Using a data table to replace time values with points values.

    Please try

    =SUMPRODUCT(INDEX(Data!$A$2:$AO$6,N(INDEX({1;2;3;4;5},)),N(INDEX(MATCH(TIME(B3:B7,C3:C7,),INDEX(MROUND(N(+Data!$A$1:$AO$1),"0:15"),)),))))
    Normal Enter

    or

    =SUM(INDEX(Data!$A$2:$AO$6,N(IF(1,{1;2;3;4;5})),N(IF(1,MATCH(TIME(B3:B7,C3:C7,),MROUND(N(+Data!$A$1:$AO$1),"0:15"))))))
    Ctrl+Shift+Enter
    Attached Files Attached Files

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

    Re: Using a data table to replace time values with points values.

    Thanks, Bo_Ry for replying to my plea for help!! That's lovely... but not the solution that I only dimly recall. But, who cares!!

  11. #11
    Registered User
    Join Date
    02-02-2022
    Location
    Leyland, England
    MS-Off Ver
    2019
    Posts
    6

    Re: Using a data table to replace time values with points values.

    Hi Bo_Ry

    Thanks for your efforts with this, I've tried both of the formulae; the first formula returns 0.00 for any input, the second returns #VALUE!

    Any help much appreciated

    Thanks Rob

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

    Re: Using a data table to replace time values with points values.

    No-one can diagnose the invisible.... Please post a sample sheet showing what you did and what the formula is not doing.

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Using a data table to replace time values with points values.

    Last try

    =SUMPRODUCT(--(TIME(B3:B7,C3:C7,)=MROUND(+Data!$B$1:$AO$1,"0:1")),Data!$B$2:$AO$6)

    The workbook is uploaded for a reason.

    1.png
    Attached Files Attached Files
    Last edited by Bo_Ry; 02-04-2022 at 05:01 AM.

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

    Re: Using a data table to replace time values with points values.

    Bo_Ry... I've been looking at this formula Why this bit:

    N(IF(1,{1;2;3;4;5}))

    Doesn't it always resolve to {1;2;3;4;5}?? Trying to learn myself...

  15. #15
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Using a data table to replace time values with points values.

    For Excel without Spill array, Index(row, column) can't read an array of row and column directly

    https://excelxor.com/2014/09/05/inde...ray-of-values/

    Evaluate these formulas (F9) and see what is inside this formula

    =INDEX({1;2;3;4;5},{1;2;3;4;5}))) => ={1}

    =INDEX({1;2;3;4;5},N(IF(1,{1;2;3;4;5}))) => ={1;2;3;4;5}

  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 2406
    Posts
    44,662

    Re: Using a data table to replace time values with points values.

    Thank you! All is clear, now...

  17. #17
    Registered User
    Join Date
    02-02-2022
    Location
    Leyland, England
    MS-Off Ver
    2019
    Posts
    6

    Re: Using a data table to replace time values with points values.

    Glenn and Bo-Ry

    Thank you so much for all your efforts with this, it is truly appreciated.

    This will definitely help me shift a mountain of data.

    Stay safe and thanks once again.

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

    Re: Using a data table to replace time values with points values.

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] VBA Code replace old values to new values depends upon column values
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2015, 08:19 AM
  2. Look Up Values with 7000+ data points
    By dkang2007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2015, 02:33 PM
  3. Choose Time Points Based on Values from Combo Box in User Form
    By Chaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2014, 01:42 PM
  4. Replies: 1
    Last Post: 09-09-2014, 05:24 AM
  5. Replace values according to a table
    By lduke in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-28-2011, 12:57 AM
  6. Assigning values to data points
    By charmandering in forum Excel General
    Replies: 4
    Last Post: 03-23-2010, 09:34 PM
  7. Way to find/replace multiple values at the same time?
    By godfire in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-24-2007, 01:42 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