» Finding the maximum value of all those meeting a certain criteria.
CATEGORY: Excel Date & Time Formulas |
VERSIONS: All Microsoft Excel Versions |
Returns #value!
samad wrote on May 27, 2005 01:21 EST
This formula shows results #value! when I same copied to excel sheet. I checked format of login time & logout time but it could not solve the problem Please guide me .
Thanks
[email]xxsamad.gadit@gmail.com[/email]
(remove xx)
Reply: samad
Alan wrote on May 30, 2005 00:01 EST
Hi samad,
[QUOTE=samad]This formula shows results #value! when I same copied to excel sheet. I checked format of login time & logout time but it could not solve the problem Please guide me .
Thanks
[email]xxsamad.gadit@gmail.com[/email]
(remove xx)[/QUOTE]Which formula? Also, what are the values in the source data cells?
Thanks,
Alan.
samad wrote on May 30, 2005 00:46 EST
Hi Alan
[=1/MAX((A14=$A$2:$A$10)*($B$2:$B$10<>0)*(1/$B$2:$B$10))]
The formula describe in this tip. I hope now it clerify.
Thanks for taking interest & hope you'll reply soon.
Problem:
Range A2:C10 contains the login and logout times of various ID's.
Each ID could log in and out a number of times a day.
How could we find the first time a specific ID logged in and the last time that same ID logged out?
Solution:
For each of the ID's in range A2:A10, enter two Array Formulas.
To find the first login time (Column B) enter the following formula:
=1/MAX((A14=$A$2:$A$10)*($B$2:$B$10<>0)*(1/$B$2:$B$10))
To find the last logout time (Column C) enter the following formula:
{=MAX(($A$2:$A$10=A14)*($C$2:$C$10))}
ID______Login Time______Logout Time
1 ______02:40___________03:10
2 ______00:15___________03:20
1 ______06:20___________09:30
3 ______09:14___________11:05
4 ______11:00___________19:30
2 ______04:05___________06:55
3 ______12:08___________17:17
1 ______10:00___________16:20
2 ______08:12___________12:33
ID______First Login Time______Last Logout Time
1 ______2:40__________________16:20
2 ______0:15__________________12:33
3 ______9:14__________________17:17
4 ______11:00_________________19:30
mangesh_yadav wrote on May 30, 2005 01:05 EST
Hi Samad,
The formula works perfectly fine. But you are not using it as an array formula. After entering the formula, you need to press control - shift - enter.
Mangesh
samad wrote on May 30, 2005 01:16 EST
Thank you Mangesh this is new thing to learn for me
[email]xxsamad.gadit@gmail.com[/email]
(remove xx)
mangesh_yadav wrote on May 30, 2005 01:33 EST
Thanks for the feedback.
Mangesh
Subtotals
Anis Shekha wrote on June 14, 2005 06:54 EST
Can any one please help me find the tip "Deleting the Word "Total" from the subtotal List"
Reply: Anis Shekha
Alan wrote on June 15, 2005 01:44 EST
Hi Anis,
[QUOTE=Anis Shekha]Can any one please help me find the tip "Deleting the Word "Total" from the subtotal List"[/QUOTE]Just google it:
[url]http://www.google.co.nz/search?hl=en&q=%22Deleting+the+Word+%22%22Total%22%22+from+the+subtotal+List%22&meta=[/url]
OR
[url]http://tinyurl.com/bq4wr[/url]
Alan.
Book Store:
Recommended Books:
- Keys to Reading an Annual Report (Barron's Business Keys)
- Yes, You Can Time the Market!
- Your First Business Plan: A Simple Question and Answer Format Designed to Help You Write Your Own Plan (3rd Ed)
- Windows XP for Dummies
- The Intelligent Investor: The Classic Bestseller on Value Investing
- The McGraw-Hill Guide to Writing a High-Impact Business Plan: A Proven Blueprint for First-Time Entrepreneurs
Related MS EXCEL TIPS:
Terms
and Conditions of use
The applications/code on this site are distributed as is and without warranties
or liability. In no event shall the owner of the copyrights, or the authors
of the applications/code be liable for any loss of profit, any problems
or any damage resulting from the use or evaluation of the applications/code.







The suggested formula:
=1/MAX((A14=$A$2:$A$10)*($B$2:$B$10<>0)*(1/$B$2:$B$10))
will always lead to a divide-by-zero error if the time 00:00 is in the table. This in turn causes the MAX() function to produce a divide-by-zero error.
The formula below solves that problem by including a very large value for the MAX() function to choose in case a 00:00 time is in the table. The reciprocal will then be small enough for the formula to return 0:00, as expected.
=1/MAX((A14=$A$2:$A$10)*IF(ISERROR(1/$B$2:$B$10),10^6,1/$B$2:$B$10))