Excel / OO Calc Formula

Discussion in 'The Lounge' started by Paxton007, Nov 12, 2012.

  1. Paxton007

    Paxton007 MajorGeek

    Is there a way to make a formula for the highlighted cell in the picture that only tallies minutes if the leftmost column contains a 1? the same for two's in the next cell down? When their grouped together like this, I can do an =sum()/60 (because on the bottom I need it listed as hours. But when the left column is 1 2 2 1 1 1 1 2 2 1 it feels like there should be an easier way than manually selecting the cells I want.

    I know enough about Calc to figure out most of what I'm trying to do, but I don't even know how to start googling this formula, so anything you can tell me will help.

    Thank you. :major
     

    Attached Files:

  2. Maxwell

    Maxwell Folgers

    Use the SUMIF function. Its syntax is =SUMIF(range, criteria, [sum_range]). In your case =SUMIF(A7:A21,1,D7:D21) and similarly if you want to sum values corresponding with 2 instead of 1.
     
  3. Paxton007

    Paxton007 MajorGeek

    I knew there had to be something about if. I was thinking it was some kind of if / then formula and never got it right. Thank you thank you! I'm guessing I can then divide that all by 60 at the end, but I'll know in a minute. That formula will make things so much better here. Thanks again!
     
  4. tonyhale

    tonyhale Lounge Lizard No.2

    You could also try using the formula with a pivot table
     
  5. Ken3

    Ken3 MajorGeek

    Is this spreadsheet for driver education or in-car driving for high-schoole students?
     
  6. Paxton007

    Paxton007 MajorGeek

    It's GPS tracking on our company vehicles. The original formula is working perfectly. The only thing that would help further would be if I could use the same kind of formula that only picked up 1's or 2's that I made BOLD on my own, but that doesn't take long to do manually. That formula would have to be something like sumif the D column is BOLD and the A column has a 1. Probably more trouble than it's worth. LOL

    I'm not sure what a pivot table is, but when I have a minute I will look it up.
     
  7. tonyhale

    tonyhale Lounge Lizard No.2

    Pivot Tables
    Choose insert,
    Insert pivot table
    Highlight your data.
    Pivot table field lift will appear to the left of your worksheet.
    Place the heading “DRIVER# in the report filter
    Place HOURS/MINUTES in the value filter
    choose sum of HOURS/MINUTES
    There is a filter symbol next to DRIVER#
    UNCHECK ALL then CHECK 1 for your first driver
    Create a second pivot table for the second driver
    Whenever you update times or increase your data base you will need to
    Click on the pivot table and choose REFRESH
    you could create a macro to refresh you data
    GOOD LUCK
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds