+ Reply to Thread
Results 1 to 3 of 3

Percentage of vehicles speeding?

Hybrid View

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    80

    Percentage of vehicles speeding?

    I have a list of data split into three columns.
    The first column is a speed limit for a particular road.
    The second column is the speed at which a vehicle was travelling along that road.
    The third column is the amount which the vehicle was breaking the speed limit.

    I am trying to come up with a formula that will read the content of the cells and produce a percentage for the total amount of vehicles that were travelling at x amount over the posted speed limit.

    Eg show the percentage of all drivers who were doing 37mph in a 30mph zone, show me the percentage of all drivers who were doing 39 mph in a 30mph zone.

    Eg, show me the percentage of all drivers who were travelling at 47mph in a 40mph zone etc...

    Hope someone can help me out
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Percentage of vehicles speeding?

    ..how the percentage of all drivers who were doing 37mph in a 30mph zone
    Does this ARRAY formula gives you the expected result?

    =AVERAGE(IF(A4:A57=30,IF(B4:B57=37,C4:C57)))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,426

    Re: Percentage of vehicles speeding?

    One way, in Excel 2003:

    =SUMPRODUCT(--($A$4:$A$57=30),--($B$4:$B$57=30+7))/SUMPRODUCT(--($A$4:$A$57=30))

    using 30 as the speed limit and 30+7 = 37 as the actual speed.

    30 and 37 could both be cell references, for example:

    =SUMPRODUCT(--(A4:A57=D2),--(B4:B57=D3))/SUMPRODUCT(--(A4:A57=D2))


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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