Finding the last value less than 24 hours

alex_a

Board Regular
Joined
Feb 27, 2012
Messages
51
Hi,

I have a list of customer names in column A of sheet 1,their product testing results in columns O, R, U, and X, and the time tests completed in column AK. I need a way to populate sheet 2, column A through F (B, C, D, E, for test results option) and F for the time test conducted with the customer name, test dates and test result( last test date less than or equal 24 hours). In column Ak of sheet ,we may have different hours of tests from1 hour to 40 hours).I need the very last value close to time 24 and its corresponding test results (pass/fail in columns O,R,U, and X).
Thanks for your help.
 
Alex_a, does my code do the trick?
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
This is the a numeric value (time difference). Has nothing to do with time format. What I am asking find the closest value to 24. Thanks.
 
Upvote 0
Unfortunately, your code is not producing the required result. It only finds the highest value, not the ones closest to value 24, plus when I change the values, the code won't change the outcome (old values in the population is still showing).
 
Upvote 0
Well in the examplefile you sent me the highest was also the closest to 24. The highest number was somewhere between 0.5 and 1.3. I did not see any that was closer to 24 than the highest. If I look at the last column, which is closer to 24 according to you? Why?
I asked you for an example sheet, which you sent, but as it was only showing an input table, and an empty output table, I was left to guess at what you wanted as output.

I can modify the code simply to delete the table first before dumping the new values, but I wanted to understand if what I was doing was correct, before spending a lot of time cleaning up.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,485
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top