Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2017, 12:59 PM
Neila1982 Neila1982 is offline Difference between 2 numbers in same cell Windows XP Difference between 2 numbers in same cell Office 2016
Novice
Difference between 2 numbers in same cell
 
Join Date: Feb 2017
Posts: 1
Neila1982 is on a distinguished road
Default Difference between 2 numbers in same cell

Hi there, i wonder if anyone can help me. I have a sheet with Monday - Sunday as column headings from B - H. The heading of column A is Name. I am creating a rota for my team and need to add a total amount of each team members hours to column H depending on what hours are in each cell next to their name.



The issue is that the start and finish times are in the same cell e.g 11-22:30 in cell B1, 17:00-21:00 in C1, 19:00-00:00 in D1. Based on this is there a formula i can use in E1 for example that the total number of hours for this line is 20.5 hours

This way i can easily work out if full and part timers are getting enough or too many hours when i am creating the rota and adding shifts

Hope this makes sense and that someone can help.

Regards

Neil
Reply With Quote
  #2  
Old 02-12-2017, 01:40 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Difference between 2 numbers in same cell Windows 7 64bit Difference between 2 numbers in same cell Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,943
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Supposing all time digits are in the hh:mm format ( 5 characters) the following seems to work
=SUMPRODUCT(-(RIGHT(A1:B1,5)))-SUMPRODUCT(-(LEFT(A1:B1,5)))
adapt ranges as needed and format the result cell as needed also ( if you have more than 24 hrs remember to use [h]:mm)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between 2 numbers in same cell Add Numbers from One or Another Cell Kilch Excel 3 01-31-2017 12:55 PM
Search a cell that contains words and numbers and convert the numbers to metric Carchee Excel Programming 36 10-08-2014 03:16 PM
How to fill a cell with random numbers to do calculations? zanat0s Excel 1 06-13-2011 10:33 AM
Difference between 2 numbers in same cell Sum & difference between multiple values in a single cell iuliandonici Excel 4 04-13-2011 09:27 PM
Difference between 2 numbers in same cell adding numbers in same cell jetdude68 Word Tables 1 07-20-2010 12:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft