+ Reply to Thread
Results 1 to 5 of 5

How do I give columns a value and calculate the total of the highlighted cells

  1. #1
    Registered User
    Join Date
    12-12-2008
    Location
    Belfast
    Posts
    2

    Exclamation How do I give columns a value and calculate the total of the highlighted cells

    --------------------------------------------------------------------------------

    Hi All,
    So my boss just walks in, hands me a weeks rota and asks me to do the following:
    Put all the info (Day, Name, start and end times) into a spreadsheet
    Show how long they work
    Show how many staff are on at peak times
    Work out how many man hours we're totalling per day

    That's all fine.
    So I set out the spreadsheet. Day divided into 30 min periods. Person's name and highlight the row to show the hours they have worked.
    Simple.

    My question is - can I get excel to total up the highlighted hours? How do I give each column the value of 0.5 hours then get it to add up all teh half hours I've highlighted? Can this even be done?

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Calculating hours worked

    Can you post a sample workbook of the data you're working with
    and the values you want to calculate? That would surely help
    us understand your situation.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    12-12-2008
    Location
    Belfast
    Posts
    2
    Does that help any?

    I want to total all the blue rows for each day...
    Attached Files Attached Files

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Calculating hours worked

    Yikes! Totaling by color is usually more trouble than it's worth.

    So...Here's what I'm proposing (see attached workbook)
    • Change the last time period to 8:30:00 PM, so it calcs as a Time Value
    • In each colored cell, enter an "x" (unless it contains a name)
    (If you don't want to "see" the x's, change the font color to match the background)

    Now, we can calculate the hours worked based on the earliest and latest
    non-blank cells using this formula:

    Please Login or Register  to view this content.
    Copy that formula down as far as you need


    Is that something you can work with?
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    I ran into this once, I just put an actual .5 in each of the needed cells, and formatted the font to match the cell color making the number invisible. Now a simple sum formula adds up the rows or columns, whatever.
    Attached Files Attached Files
    Last edited by JBeaucaire; 12-12-2008 at 01:58 PM. Reason: Add worksheet
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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