Solved

Rounding time with a Vlookup or a better way...

Posted on 2011-02-27
12
202 Views
Last Modified: 2012-06-27
I have myself a bit turned around with this time project. In a nutshell, I have built a sheet to track time. Once it is tracked it will come to this totals page.
When we have the total amount of time the employee will get paid for....It is based on 15 minute increments. If it is below 7 minutes, it goes back to 0.
If it is  8min-22 minutes it is rounded to 15min. 23-37 is 30min. 38-52 is 45min. Anything greater than 52 is added to the top of the hour. So, 4 hours and 55 minutes will
get paid for 5 hours.

I took this idea and formed a vlookup formula. But, I must admit I am totally lost. Any help with the formula or a better way to achieve this is greatly appreciated.
expert-example-of-rounding-up-th.xlsx
0
Comment
Question by:bvanscoy678
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 34992950
Its called buckets. Here is one example but if you search for buckets you will find many examples. http://en.m.wikipedia.org/wiki/Geometric_mean?wasRedirected=true
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 34992953
0
 

Author Comment

by:bvanscoy678
ID: 34992979
Okay, I will google buckets.
thanks
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 42

Accepted Solution

by:
dlmille earned 500 total points
ID: 34992983
At first glance, your Vlookup in cell e16 looks fine, and it looks like you're on the right track for what you want to do, but you copied it to the right without locking the address down.  The correct way to formulate the lookup is:

=VLOOKUP(G15,$J$1:$K$6,2,TRUE)

The dollar signs keep the range you're looking at from changing.  Just copying it to the right fixes the problem.

See attached,

Dave
Time-Roundup-r1.xlsx
0
 
LVL 50
ID: 34992989
Hello,

your formula and idea are fundamentally correct, but the Vlookup refers to the wrong range. Instead of

=VLOOKUP(G15,L1:M6,2,TRUE)

use

=VLOOKUP(G15,J1:K5,2,TRUE)

cheers, teylyn
0
 
LVL 42

Expert Comment

by:dlmille
ID: 34992995
And I updated your table, you were missing the 38-52 traunche.

Dave
Time-Roundup-r1.xlsx
0
 

Author Comment

by:bvanscoy678
ID: 34992997
You might be correct with buckets, but can't find something that helps sort out my issue.
0
 
LVL 42

Expert Comment

by:dlmille
ID: 34993008
@bvanscoy678, - execuse me - it appears you accepted an answer that was subordinate to mine.  not only did I repair your VLOOKUP, but the VLOOKUP range - and did the prior before Teylyn did.

Please explain.

Dave
0
 
LVL 42

Expert Comment

by:dlmille
ID: 34993020
I have requested the moderator's attention.

Dave
0
 

Author Comment

by:bvanscoy678
ID: 34993382
My apologizes. It was a simple error of not looking close enough. I thought it was the same person.
Dave, Sorry...honest mistake. I appreciate both posters help.

Thanks
0
 
LVL 42

Expert Comment

by:dlmille
ID: 34993622
I figured as much and have done the same thing.  

No worries.

Dave
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question