Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default Length & Distance formula

Hi,
I need a formula that will count based on the length of a vehicle, and a
timed distance (counted in seconds) the vehicle is behind another vehicle.
Heres the breakdown;
Satisfactory result for 40 = 6 sec, 60' = 8 sec
Less than Satisfactory 40' = 3 sec & <6 sec, & 60'= 4 sec & <8 sec
NOT Satisfactory 40' = 3 sec or less & 60' = 4 sec or less
40 vehicles can be separated from the 60 by the vehicle numbers.
All 40 vehicle numbers will start with 24, 90, and 91.
So I have 3 columns to place a count. Satisfactory in Q3, less than
Satisfactory in R3, and Not Satisfactory in S3.
The vehicle numbers are recorded in column C, and the following distance in
seconds is recorded in G.
If C3 is blank then all will remain blank.
Also, if possible I would like to set a conditional format in column G.
Green for satisfactory, yellow for less than satisfactory and red for not
satisfactory.
Any help is appreciated.
Dale

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default Length & Distance formula

Suppose you data is in rows 10 to 100

We need a way of know the vehicle length
In H10 enter =(LEFT(C10,2)="24")+(LEFT(C10,2)="90")+(LEFT(C10,2 )="91") and
copy down the column
The 40 footer will return 1, the other will return 0

In Q3 to count all Satisfactory:
=SUMPRODUCT(--(H10:H100=1),--(G10:G100=6))+SUMPRODUCT(--(H10:H100=0),--(G10:G100=8))
In S3 for Less than Satisfactory
=SUMPRODUCT(--(H10:H100=1),--(G10:G100<6),--(G10:G100=3))+SUMPRODUCT(--(H10:H100=0),--(G10:G100<8),--(G10:G100=4))
In R3 fro Unsatisfactory
=COUNTA(C10:C100)-(Q3+R3)

To hide results if C3 is blank, in Q3 use
=IF(C3="","",=SUMPRODUCT(--(H10:H100=1),--(G10:G100=6))+SUMPRODUCT(--(H10:H100=0),--(G10:G100=8)))
Likewise in other cells

For the green condition in G column; select all the G data and use this
formula in thee conditional formatting dialog
=OR(AND($H10=1,G10=6),AND($H10=0,G10=8)) and set fill or text to green
For yellow
=OR(AND($H10=1,G10<6,G10=3),AND($H10=0,G10<8.G10 =4))
For red
=OR(AND($H10=1,G10<3),AND($H10=0,G10<4))

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
REMINDER: These newsgroups are about to die. We will all meet again at
http://social.answers.microsoft.com/...ry/officeexcel

"Dale G" wrote in message
...
Hi,
I need a formula that will count based on the length of a vehicle, and a
timed distance (counted in seconds) the vehicle is behind another vehicle.
Heres the breakdown;
Satisfactory result for 40 = 6 sec, 60' = 8 sec
Less than Satisfactory 40' = 3 sec & <6 sec, & 60'= 4 sec & <8 sec
NOT Satisfactory 40' = 3 sec or less & 60' = 4 sec or less
40 vehicles can be separated from the 60 by the vehicle numbers.
All 40 vehicle numbers will start with 24, 90, and 91.
So I have 3 columns to place a count. Satisfactory in Q3, less than
Satisfactory in R3, and Not Satisfactory in S3.
The vehicle numbers are recorded in column C, and the following distance
in
seconds is recorded in G.
If C3 is blank then all will remain blank.
Also, if possible I would like to set a conditional format in column G.
Green for satisfactory, yellow for less than satisfactory and red for not
satisfactory.
Any help is appreciated.
Dale

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default Length & Distance formula

Bernard, Thank you.
These formulas are excellent & work very well. I started at the top & copied
them all the way past my existing data. Now when I add the info all is well.
Only one thing; when I pass my existing data to rows that are not filled with
time and vehicle info the conditionally formatted column is red.
Is there a way to have the column appear blank until after the data is
entered?
Heres what Ive done so far.
=(LEFT(C3,2)="24")+(LEFT(C3,2)="90")+(LEFT(C3,2)=" 91")
=IF(C3="","",SUMPRODUCT(--(W3:H3=1),--(G3:G3=6))+SUMPRODUCT(--(W3:H3=0),--(G3:G11000=8)))
=IF(C3="","",SUMPRODUCT(--(W3:H3=1),--(G3:G3<6),--(G3:G3=3))+SUMPRODUCT(--(W3:H3=0),--(G3:G38),--(G3:G3=4))
=COUNTA(C3:C3)-(Q3+R3)
=OR(AND($W3=1,G3=6),AND($W3=0,G3=8)) green
=OR(AND($W3=1,G3<6,G3=3),AND($W3=0,G3<8,G3=4)) yellow
=OR(AND($W3=1,G3<3),AND($W3=0,G3<4)) red


"Bernard Liengme" wrote:

Suppose you data is in rows 10 to 100

We need a way of know the vehicle length
In H10 enter =(LEFT(C10,2)="24")+(LEFT(C10,2)="90")+(LEFT(C10,2 )="91") and
copy down the column
The 40 footer will return 1, the other will return 0

In Q3 to count all Satisfactory:
=SUMPRODUCT(--(H10:H100=1),--(G10:G100=6))+SUMPRODUCT(--(H10:H100=0),--(G10:G100=8))
In S3 for Less than Satisfactory
=SUMPRODUCT(--(H10:H100=1),--(G10:G100<6),--(G10:G100=3))+SUMPRODUCT(--(H10:H100=0),--(G10:G100<8),--(G10:G100=4))
In R3 fro Unsatisfactory
=COUNTA(C10:C100)-(Q3+R3)

To hide results if C3 is blank, in Q3 use
=IF(C3="","",=SUMPRODUCT(--(H10:H100=1),--(G10:G100=6))+SUMPRODUCT(--(H10:H100=0),--(G10:G100=8)))
Likewise in other cells

For the green condition in G column; select all the G data and use this
formula in thee conditional formatting dialog
=OR(AND($H10=1,G10=6),AND($H10=0,G10=8)) and set fill or text to green
For yellow
=OR(AND($H10=1,G10<6,G10=3),AND($H10=0,G10<8.G10 =4))
For red
=OR(AND($H10=1,G10<3),AND($H10=0,G10<4))

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
REMINDER: These newsgroups are about to die. We will all meet again at
http://social.answers.microsoft.com/...ry/officeexcel

"Dale G" wrote in message
...
Hi,
I need a formula that will count based on the length of a vehicle, and a
timed distance (counted in seconds) the vehicle is behind another vehicle.
Heres the breakdown;
Satisfactory result for 40 = 6 sec, 60' = 8 sec
Less than Satisfactory 40' = 3 sec & <6 sec, & 60'= 4 sec & <8 sec
NOT Satisfactory 40' = 3 sec or less & 60' = 4 sec or less
40 vehicles can be separated from the 60 by the vehicle numbers.
All 40 vehicle numbers will start with 24, 90, and 91.
So I have 3 columns to place a count. Satisfactory in Q3, less than
Satisfactory in R3, and Not Satisfactory in S3.
The vehicle numbers are recorded in column C, and the following distance
in
seconds is recorded in G.
If C3 is blank then all will remain blank.
Also, if possible I would like to set a conditional format in column G.
Green for satisfactory, yellow for less than satisfactory and red for not
satisfactory.
Any help is appreciated.
Dale

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 85
Default Length & Distance formula

I got it.

=OR(AND($G3<"",$W3=1,G3<3),AND($G3<"",$W3=0,G3<4 ))

Thanks again.

"Dale G" wrote:

Bernard, Thank you.
These formulas are excellent & work very well. I started at the top & copied
them all the way past my existing data. Now when I add the info all is well.
Only one thing; when I pass my existing data to rows that are not filled with
time and vehicle info the conditionally formatted column is red.
Is there a way to have the column appear blank until after the data is
entered?
Heres what Ive done so far.
=(LEFT(C3,2)="24")+(LEFT(C3,2)="90")+(LEFT(C3,2)=" 91")
=IF(C3="","",SUMPRODUCT(--(W3:H3=1),--(G3:G3=6))+SUMPRODUCT(--(W3:H3=0),--(G3:G11000=8)))
=IF(C3="","",SUMPRODUCT(--(W3:H3=1),--(G3:G3<6),--(G3:G3=3))+SUMPRODUCT(--(W3:H3=0),--(G3:G38),--(G3:G3=4))
=COUNTA(C3:C3)-(Q3+R3)
=OR(AND($W3=1,G3=6),AND($W3=0,G3=8)) green
=OR(AND($W3=1,G3<6,G3=3),AND($W3=0,G3<8,G3=4)) yellow
=OR(AND($W3=1,G3<3),AND($W3=0,G3<4)) red


"Bernard Liengme" wrote:

Suppose you data is in rows 10 to 100

We need a way of know the vehicle length
In H10 enter =(LEFT(C10,2)="24")+(LEFT(C10,2)="90")+(LEFT(C10,2 )="91") and
copy down the column
The 40 footer will return 1, the other will return 0

In Q3 to count all Satisfactory:
=SUMPRODUCT(--(H10:H100=1),--(G10:G100=6))+SUMPRODUCT(--(H10:H100=0),--(G10:G100=8))
In S3 for Less than Satisfactory
=SUMPRODUCT(--(H10:H100=1),--(G10:G100<6),--(G10:G100=3))+SUMPRODUCT(--(H10:H100=0),--(G10:G100<8),--(G10:G100=4))
In R3 fro Unsatisfactory
=COUNTA(C10:C100)-(Q3+R3)

To hide results if C3 is blank, in Q3 use
=IF(C3="","",=SUMPRODUCT(--(H10:H100=1),--(G10:G100=6))+SUMPRODUCT(--(H10:H100=0),--(G10:G100=8)))
Likewise in other cells

For the green condition in G column; select all the G data and use this
formula in thee conditional formatting dialog
=OR(AND($H10=1,G10=6),AND($H10=0,G10=8)) and set fill or text to green
For yellow
=OR(AND($H10=1,G10<6,G10=3),AND($H10=0,G10<8.G10 =4))
For red
=OR(AND($H10=1,G10<3),AND($H10=0,G10<4))

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
REMINDER: These newsgroups are about to die. We will all meet again at
http://social.answers.microsoft.com/...ry/officeexcel

"Dale G" wrote in message
...
Hi,
I need a formula that will count based on the length of a vehicle, and a
timed distance (counted in seconds) the vehicle is behind another vehicle.
Heres the breakdown;
Satisfactory result for 40 = 6 sec, 60' = 8 sec
Less than Satisfactory 40' = 3 sec & <6 sec, & 60'= 4 sec & <8 sec
NOT Satisfactory 40' = 3 sec or less & 60' = 4 sec or less
40 vehicles can be separated from the 60 by the vehicle numbers.
All 40 vehicle numbers will start with 24, 90, and 91.
So I have 3 columns to place a count. Satisfactory in Q3, less than
Satisfactory in R3, and Not Satisfactory in S3.
The vehicle numbers are recorded in column C, and the following distance
in
seconds is recorded in G.
If C3 is blank then all will remain blank.
Also, if possible I would like to set a conditional format in column G.
Green for satisfactory, yellow for less than satisfactory and red for not
satisfactory.
Any help is appreciated.
Dale

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Race Distance Formula Saxman Excel Discussion (Misc queries) 10 November 12th 06 01:16 PM
Formula length Abhay Excel Discussion (Misc queries) 3 May 18th 06 05:40 PM
Creating a formula for down and distance Cecil Excel Worksheet Functions 3 August 29th 05 04:03 AM
A formula to express distance per minute .... Don Excel Discussion (Misc queries) 2 March 29th 05 03:15 PM
Time and distance formula drumnotme118 Excel Worksheet Functions 2 November 20th 04 06:22 AM


All times are GMT +1. The time now is 12:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"