+ Reply to Thread
Results 1 to 14 of 14

IF function problem

Hybrid View

Guest IF function problem 03-07-2005, 12:06 PM
Guest Re: IF function problem 03-07-2005, 01:06 PM
Guest Re: IF function problem 03-07-2005, 01:06 PM
Guest Re: IF function problem 03-07-2005, 01:06 PM
Guest Re: IF function problem 03-07-2005, 01:06 PM
Guest Re: IF function problem 03-07-2005, 04:10 PM
Guest Re: IF function problem 03-07-2005, 06:06 PM
Guest Re: IF function problem 03-08-2005, 12:06 PM
Guest Re: IF function problem 03-09-2005, 11:06 AM
Guest IF function problem 03-07-2005, 01:06 PM
Guest RE: IF function problem 03-07-2005, 01:06 PM
  1. #1
    dvonj
    Guest

    IF function problem

    This is a rather complex issue so I will understand if I need to have a
    programmer take this on.
    Here goes, I need to keep track of driver total hours. Drivers cannot work
    over a certain number of hours in a week. There are two shifts an AM sign on
    and sign off time plus a PM sign on and sign off time. To complicate this
    each driver is guaranteed a minimum of 2.25 hours for both AM and PM shifts.
    I am using an IF function to validate the value of a cell based on the amount
    of time for each shift. I use a formula to calculate the difference between
    the sign off and sign on times and put that value in a cell then check to see
    if the value meets certain conditions.

    If the value returned is grater than 2.25 I place the grater value in
    another cell. If the value is less than 2.25 I place 2.25 in the cell. I then
    total the AM and PM times and get the number of hours the driver worked that
    day. The IF function looks like this…=IF(E11>=F5,E11,"2.25"). F5 contains the
    value 2.25, the check value. My problem is that the value 2.25 is returned on
    non data or an empty cell. The IF function evaluates non data or an empty
    cell to be les than 2.25 thus returning 2.25 giving hours where there should
    not be any for that time period.
    Is there a way to create a validation that will ignore an empty cell until
    data is supplied?
    I apologize for this being so long winded.


  2. #2
    Bob Phillips
    Guest

    Re: IF function problem

    =IF(E11="","",IF(E11>=F5,E11,F5))

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > This is a rather complex issue so I will understand if I need to have a
    > programmer take this on.
    > Here goes, I need to keep track of driver total hours. Drivers cannot work
    > over a certain number of hours in a week. There are two shifts an AM sign

    on
    > and sign off time plus a PM sign on and sign off time. To complicate this
    > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    shifts.
    > I am using an IF function to validate the value of a cell based on the

    amount
    > of time for each shift. I use a formula to calculate the difference

    between
    > the sign off and sign on times and put that value in a cell then check to

    see
    > if the value meets certain conditions.
    >
    > If the value returned is grater than 2.25 I place the grater value in
    > another cell. If the value is less than 2.25 I place 2.25 in the cell. I

    then
    > total the AM and PM times and get the number of hours the driver worked

    that
    > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains

    the
    > value 2.25, the check value. My problem is that the value 2.25 is returned

    on
    > non data or an empty cell. The IF function evaluates non data or an empty
    > cell to be les than 2.25 thus returning 2.25 giving hours where there

    should
    > not be any for that time period.
    > Is there a way to create a validation that will ignore an empty cell until
    > data is supplied?
    > I apologize for this being so long winded.
    >




  3. #3
    dvonj
    Guest

    Re: IF function problem

    Thanks Bob but that still returns 2.25 however I was wrong about there being
    non data or empty cell. The cell has 0.00 in it because there is no sign on
    or sign off times yet. Cell E11 contains the formula =(D11-C11)*24 to
    calculate the difference between sign off and sign on times and the value is
    placed in cell E11. Sorry this wasn't clear in my first post.

    "Bob Phillips" wrote:

    > =IF(E11="","",IF(E11>=F5,E11,F5))
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > > This is a rather complex issue so I will understand if I need to have a
    > > programmer take this on.
    > > Here goes, I need to keep track of driver total hours. Drivers cannot work
    > > over a certain number of hours in a week. There are two shifts an AM sign

    > on
    > > and sign off time plus a PM sign on and sign off time. To complicate this
    > > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    > shifts.
    > > I am using an IF function to validate the value of a cell based on the

    > amount
    > > of time for each shift. I use a formula to calculate the difference

    > between
    > > the sign off and sign on times and put that value in a cell then check to

    > see
    > > if the value meets certain conditions.
    > >
    > > If the value returned is grater than 2.25 I place the grater value in
    > > another cell. If the value is less than 2.25 I place 2.25 in the cell. I

    > then
    > > total the AM and PM times and get the number of hours the driver worked

    > that
    > > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains

    > the
    > > value 2.25, the check value. My problem is that the value 2.25 is returned

    > on
    > > non data or an empty cell. The IF function evaluates non data or an empty
    > > cell to be les than 2.25 thus returning 2.25 giving hours where there

    > should
    > > not be any for that time period.
    > > Is there a way to create a validation that will ignore an empty cell until
    > > data is supplied?
    > > I apologize for this being so long winded.
    > >

    >
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: IF function problem

    Try this then

    =IF(E11=0,"",IF(E11>=F5,E11,F5))


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    news:73FAD251-F487-444F-A90B-500B0DE2398F@microsoft.com...
    > Thanks Bob but that still returns 2.25 however I was wrong about there

    being
    > non data or empty cell. The cell has 0.00 in it because there is no sign

    on
    > or sign off times yet. Cell E11 contains the formula =(D11-C11)*24 to
    > calculate the difference between sign off and sign on times and the value

    is
    > placed in cell E11. Sorry this wasn't clear in my first post.
    >
    > "Bob Phillips" wrote:
    >
    > > =IF(E11="","",IF(E11>=F5,E11,F5))
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > > > This is a rather complex issue so I will understand if I need to have

    a
    > > > programmer take this on.
    > > > Here goes, I need to keep track of driver total hours. Drivers cannot

    work
    > > > over a certain number of hours in a week. There are two shifts an AM

    sign
    > > on
    > > > and sign off time plus a PM sign on and sign off time. To complicate

    this
    > > > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    > > shifts.
    > > > I am using an IF function to validate the value of a cell based on the

    > > amount
    > > > of time for each shift. I use a formula to calculate the difference

    > > between
    > > > the sign off and sign on times and put that value in a cell then check

    to
    > > see
    > > > if the value meets certain conditions.
    > > >
    > > > If the value returned is grater than 2.25 I place the grater value in
    > > > another cell. If the value is less than 2.25 I place 2.25 in the cell.

    I
    > > then
    > > > total the AM and PM times and get the number of hours the driver

    worked
    > > that
    > > > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5

    contains
    > > the
    > > > value 2.25, the check value. My problem is that the value 2.25 is

    returned
    > > on
    > > > non data or an empty cell. The IF function evaluates non data or an

    empty
    > > > cell to be les than 2.25 thus returning 2.25 giving hours where there

    > > should
    > > > not be any for that time period.
    > > > Is there a way to create a validation that will ignore an empty cell

    until
    > > > data is supplied?
    > > > I apologize for this being so long winded.
    > > >

    > >
    > >
    > >




  5. #5
    RagDyeR
    Guest

    Re: IF function problem

    Try this:

    =MAX(E11,F5)*(E11>0)
    --

    HTH,

    RD
    ==============================================
    Please keep all correspondence within the Group, so all may benefit!
    ==============================================


    "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    This is a rather complex issue so I will understand if I need to have a
    programmer take this on.
    Here goes, I need to keep track of driver total hours. Drivers cannot work
    over a certain number of hours in a week. There are two shifts an AM sign on
    and sign off time plus a PM sign on and sign off time. To complicate this
    each driver is guaranteed a minimum of 2.25 hours for both AM and PM shifts.
    I am using an IF function to validate the value of a cell based on the
    amount
    of time for each shift. I use a formula to calculate the difference between
    the sign off and sign on times and put that value in a cell then check to
    see
    if the value meets certain conditions.

    If the value returned is grater than 2.25 I place the grater value in
    another cell. If the value is less than 2.25 I place 2.25 in the cell. I
    then
    total the AM and PM times and get the number of hours the driver worked that
    day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains
    the
    value 2.25, the check value. My problem is that the value 2.25 is returned
    on
    non data or an empty cell. The IF function evaluates non data or an empty
    cell to be les than 2.25 thus returning 2.25 giving hours where there should
    not be any for that time period.
    Is there a way to create a validation that will ignore an empty cell until
    data is supplied?
    I apologize for this being so long winded.



  6. #6
    dvonj
    Guest

    Re: IF function problem

    I tried both your example and Dave Ramage and after using some test data your
    example worked both ways while Dave's only worked if the value in E11 is
    greater than the check value. Dave on your example If the value returned was
    less than the check value (2.25) the lessor value was returned and not
    replaced with the check value which is what I need it to do. RagDyeR your
    example works best. Thanks for the tip.

    and thanks to everyone for helping this is an awsome forum.
    I just hope my boss won't thing I am now useless because I created a
    spreadsheet that automates what the office has been doing by hand:-)

    "RagDyeR" wrote:

    > Try this:
    >
    > =MAX(E11,F5)*(E11>0)
    > --
    >
    > HTH,
    >
    > RD
    > ==============================================
    > Please keep all correspondence within the Group, so all may benefit!
    > ==============================================
    >
    >
    > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > This is a rather complex issue so I will understand if I need to have a
    > programmer take this on.
    > Here goes, I need to keep track of driver total hours. Drivers cannot work
    > over a certain number of hours in a week. There are two shifts an AM sign on
    > and sign off time plus a PM sign on and sign off time. To complicate this
    > each driver is guaranteed a minimum of 2.25 hours for both AM and PM shifts.
    > I am using an IF function to validate the value of a cell based on the
    > amount
    > of time for each shift. I use a formula to calculate the difference between
    > the sign off and sign on times and put that value in a cell then check to
    > see
    > if the value meets certain conditions.
    >
    > If the value returned is grater than 2.25 I place the grater value in
    > another cell. If the value is less than 2.25 I place 2.25 in the cell. I
    > then
    > total the AM and PM times and get the number of hours the driver worked that
    > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains
    > the
    > value 2.25, the check value. My problem is that the value 2.25 is returned
    > on
    > non data or an empty cell. The IF function evaluates non data or an empty
    > cell to be les than 2.25 thus returning 2.25 giving hours where there should
    > not be any for that time period.
    > Is there a way to create a validation that will ignore an empty cell until
    > data is supplied?
    > I apologize for this being so long winded.
    >
    >
    >


  7. #7
    Bob Phillips
    Guest

    Re: IF function problem

    Surely, if he has any sense he will think quite the opposite.

    Bob


    "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    news:158ECE6B-679D-4B0B-8575-BCD97D06AE79@microsoft.com...
    > I tried both your example and Dave Ramage and after using some test data

    your
    > example worked both ways while Dave's only worked if the value in E11 is
    > greater than the check value. Dave on your example If the value returned

    was
    > less than the check value (2.25) the lessor value was returned and not
    > replaced with the check value which is what I need it to do. RagDyeR your
    > example works best. Thanks for the tip.
    >
    > and thanks to everyone for helping this is an awsome forum.
    > I just hope my boss won't thing I am now useless because I created a
    > spreadsheet that automates what the office has been doing by hand:-)
    >
    > "RagDyeR" wrote:
    >
    > > Try this:
    > >
    > > =MAX(E11,F5)*(E11>0)
    > > --
    > >
    > > HTH,
    > >
    > > RD
    > > ==============================================
    > > Please keep all correspondence within the Group, so all may benefit!
    > > ==============================================
    > >
    > >
    > > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > > This is a rather complex issue so I will understand if I need to have a
    > > programmer take this on.
    > > Here goes, I need to keep track of driver total hours. Drivers cannot

    work
    > > over a certain number of hours in a week. There are two shifts an AM

    sign on
    > > and sign off time plus a PM sign on and sign off time. To complicate

    this
    > > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    shifts.
    > > I am using an IF function to validate the value of a cell based on the
    > > amount
    > > of time for each shift. I use a formula to calculate the difference

    between
    > > the sign off and sign on times and put that value in a cell then check

    to
    > > see
    > > if the value meets certain conditions.
    > >
    > > If the value returned is grater than 2.25 I place the grater value in
    > > another cell. If the value is less than 2.25 I place 2.25 in the cell. I
    > > then
    > > total the AM and PM times and get the number of hours the driver worked

    that
    > > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5

    contains
    > > the
    > > value 2.25, the check value. My problem is that the value 2.25 is

    returned
    > > on
    > > non data or an empty cell. The IF function evaluates non data or an

    empty
    > > cell to be les than 2.25 thus returning 2.25 giving hours where there

    should
    > > not be any for that time period.
    > > Is there a way to create a validation that will ignore an empty cell

    until
    > > data is supplied?
    > > I apologize for this being so long winded.
    > >
    > >
    > >




  8. #8
    RagDyeR
    Guest

    Re: IF function problem

    An so ... Are you implying that it's my fault if you should happen to get
    "Laid Off"?<bg>

    Just keep coming back here to automate other tasks, and show him how
    resourceful you will *continue* to be.
    --

    Regards,

    RD
    --------------------------------------------------------------------
    Please keep all correspondence within the Group, so all may benefit !
    --------------------------------------------------------------------

    "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    news:158ECE6B-679D-4B0B-8575-BCD97D06AE79@microsoft.com...
    I tried both your example and Dave Ramage and after using some test data
    your
    example worked both ways while Dave's only worked if the value in E11 is
    greater than the check value. Dave on your example If the value returned was
    less than the check value (2.25) the lessor value was returned and not
    replaced with the check value which is what I need it to do. RagDyeR your
    example works best. Thanks for the tip.

    and thanks to everyone for helping this is an awsome forum.
    I just hope my boss won't thing I am now useless because I created a
    spreadsheet that automates what the office has been doing by hand:-)

    "RagDyeR" wrote:

    > Try this:
    >
    > =MAX(E11,F5)*(E11>0)
    > --
    >
    > HTH,
    >
    > RD
    > ==============================================
    > Please keep all correspondence within the Group, so all may benefit!
    > ==============================================
    >
    >
    > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > This is a rather complex issue so I will understand if I need to have a
    > programmer take this on.
    > Here goes, I need to keep track of driver total hours. Drivers cannot work
    > over a certain number of hours in a week. There are two shifts an AM sign

    on
    > and sign off time plus a PM sign on and sign off time. To complicate this
    > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    shifts.
    > I am using an IF function to validate the value of a cell based on the
    > amount
    > of time for each shift. I use a formula to calculate the difference

    between
    > the sign off and sign on times and put that value in a cell then check to
    > see
    > if the value meets certain conditions.
    >
    > If the value returned is grater than 2.25 I place the grater value in
    > another cell. If the value is less than 2.25 I place 2.25 in the cell. I
    > then
    > total the AM and PM times and get the number of hours the driver worked

    that
    > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains
    > the
    > value 2.25, the check value. My problem is that the value 2.25 is returned
    > on
    > non data or an empty cell. The IF function evaluates non data or an empty
    > cell to be les than 2.25 thus returning 2.25 giving hours where there

    should
    > not be any for that time period.
    > Is there a way to create a validation that will ignore an empty cell until
    > data is supplied?
    > I apologize for this being so long winded.
    >
    >
    >




  9. #9
    dvonj
    Guest

    Re: IF function problem

    No but I am saying that when he recognizes how valuable I am it will be
    because of you and this awsome forum...but thats our secret right? smiles.

    "RagDyeR" wrote:

    > An so ... Are you implying that it's my fault if you should happen to get
    > "Laid Off"?<bg>
    >
    > Just keep coming back here to automate other tasks, and show him how
    > resourceful you will *continue* to be.
    > --
    >
    > Regards,
    >
    > RD
    > --------------------------------------------------------------------
    > Please keep all correspondence within the Group, so all may benefit !
    > --------------------------------------------------------------------
    >
    > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > news:158ECE6B-679D-4B0B-8575-BCD97D06AE79@microsoft.com...
    > I tried both your example and Dave Ramage and after using some test data
    > your
    > example worked both ways while Dave's only worked if the value in E11 is
    > greater than the check value. Dave on your example If the value returned was
    > less than the check value (2.25) the lessor value was returned and not
    > replaced with the check value which is what I need it to do. RagDyeR your
    > example works best. Thanks for the tip.
    >
    > and thanks to everyone for helping this is an awsome forum.
    > I just hope my boss won't thing I am now useless because I created a
    > spreadsheet that automates what the office has been doing by hand:-)
    >
    > "RagDyeR" wrote:
    >
    > > Try this:
    > >
    > > =MAX(E11,F5)*(E11>0)
    > > --
    > >
    > > HTH,
    > >
    > > RD
    > > ==============================================
    > > Please keep all correspondence within the Group, so all may benefit!
    > > ==============================================
    > >
    > >
    > > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > > This is a rather complex issue so I will understand if I need to have a
    > > programmer take this on.
    > > Here goes, I need to keep track of driver total hours. Drivers cannot work
    > > over a certain number of hours in a week. There are two shifts an AM sign

    > on
    > > and sign off time plus a PM sign on and sign off time. To complicate this
    > > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    > shifts.
    > > I am using an IF function to validate the value of a cell based on the
    > > amount
    > > of time for each shift. I use a formula to calculate the difference

    > between
    > > the sign off and sign on times and put that value in a cell then check to
    > > see
    > > if the value meets certain conditions.
    > >
    > > If the value returned is grater than 2.25 I place the grater value in
    > > another cell. If the value is less than 2.25 I place 2.25 in the cell. I
    > > then
    > > total the AM and PM times and get the number of hours the driver worked

    > that
    > > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains
    > > the
    > > value 2.25, the check value. My problem is that the value 2.25 is returned
    > > on
    > > non data or an empty cell. The IF function evaluates non data or an empty
    > > cell to be les than 2.25 thus returning 2.25 giving hours where there

    > should
    > > not be any for that time period.
    > > Is there a way to create a validation that will ignore an empty cell until
    > > data is supplied?
    > > I apologize for this being so long winded.
    > >
    > >
    > >

    >
    >
    >


  10. #10
    dvonj
    Guest

    Re: IF function problem

    Also can you recommend a good Excel book that takes in to consideration that
    I am yet a novice but learns very quickly?

    "dvonj" wrote:

    > No but I am saying that when he recognizes how valuable I am it will be
    > because of you and this awsome forum...but thats our secret right? smiles.
    >
    > "RagDyeR" wrote:
    >
    > > An so ... Are you implying that it's my fault if you should happen to get
    > > "Laid Off"?<bg>
    > >
    > > Just keep coming back here to automate other tasks, and show him how
    > > resourceful you will *continue* to be.
    > > --
    > >
    > > Regards,
    > >
    > > RD
    > > --------------------------------------------------------------------
    > > Please keep all correspondence within the Group, so all may benefit !
    > > --------------------------------------------------------------------
    > >
    > > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > > news:158ECE6B-679D-4B0B-8575-BCD97D06AE79@microsoft.com...
    > > I tried both your example and Dave Ramage and after using some test data
    > > your
    > > example worked both ways while Dave's only worked if the value in E11 is
    > > greater than the check value. Dave on your example If the value returned was
    > > less than the check value (2.25) the lessor value was returned and not
    > > replaced with the check value which is what I need it to do. RagDyeR your
    > > example works best. Thanks for the tip.
    > >
    > > and thanks to everyone for helping this is an awsome forum.
    > > I just hope my boss won't thing I am now useless because I created a
    > > spreadsheet that automates what the office has been doing by hand:-)
    > >
    > > "RagDyeR" wrote:
    > >
    > > > Try this:
    > > >
    > > > =MAX(E11,F5)*(E11>0)
    > > > --
    > > >
    > > > HTH,
    > > >
    > > > RD
    > > > ==============================================
    > > > Please keep all correspondence within the Group, so all may benefit!
    > > > ==============================================
    > > >
    > > >
    > > > "dvonj" <dvonj@discussions.microsoft.com> wrote in message
    > > > news:366666D5-FF25-4CA0-A82E-ED126C17C537@microsoft.com...
    > > > This is a rather complex issue so I will understand if I need to have a
    > > > programmer take this on.
    > > > Here goes, I need to keep track of driver total hours. Drivers cannot work
    > > > over a certain number of hours in a week. There are two shifts an AM sign

    > > on
    > > > and sign off time plus a PM sign on and sign off time. To complicate this
    > > > each driver is guaranteed a minimum of 2.25 hours for both AM and PM

    > > shifts.
    > > > I am using an IF function to validate the value of a cell based on the
    > > > amount
    > > > of time for each shift. I use a formula to calculate the difference

    > > between
    > > > the sign off and sign on times and put that value in a cell then check to
    > > > see
    > > > if the value meets certain conditions.
    > > >
    > > > If the value returned is grater than 2.25 I place the grater value in
    > > > another cell. If the value is less than 2.25 I place 2.25 in the cell. I
    > > > then
    > > > total the AM and PM times and get the number of hours the driver worked

    > > that
    > > > day. The IF function looks like this.=IF(E11>=F5,E11,"2.25"). F5 contains
    > > > the
    > > > value 2.25, the check value. My problem is that the value 2.25 is returned
    > > > on
    > > > non data or an empty cell. The IF function evaluates non data or an empty
    > > > cell to be les than 2.25 thus returning 2.25 giving hours where there

    > > should
    > > > not be any for that time period.
    > > > Is there a way to create a validation that will ignore an empty cell until
    > > > data is supplied?
    > > > I apologize for this being so long winded.
    > > >
    > > >
    > > >

    > >
    > >
    > >


  11. #11
    Dave Ramage
    Guest

    IF function problem

    Try this:

    =3DIF(ISNUMBER(E11),IF(E11>$E$5,E11,$E$11),"")

    If the value in E11 is non-numeric then an empty string is=20
    returned. You could also use this to return zero instead:

    =3DIF(ISNUMBER(E11),IF(E11>$E$5,E11,$E$11),0)

    Cheers,
    Dave
    >-----Original Message-----
    >This is a rather complex issue so I will understand if I=20

    need to have a=20
    >programmer take this on.=20
    >Here goes, I need to keep track of driver total hours.=20

    Drivers cannot work=20
    >over a certain number of hours in a week. There are two=20

    shifts an AM sign on=20
    >and sign off time plus a PM sign on and sign off time. To=20

    complicate this=20
    >each driver is guaranteed a minimum of 2.25 hours for=20

    both AM and PM shifts.=20
    >I am using an IF function to validate the value of a cell=20

    based on the amount=20
    >of time for each shift. I use a formula to calculate the=20

    difference between=20
    >the sign off and sign on times and put that value in a=20

    cell then check to see=20
    >if the value meets certain conditions.
    >
    > If the value returned is grater than 2.25 I place the=20

    grater value in=20
    >another cell. If the value is less than 2.25 I place 2.25=20

    in the cell. I then=20
    >total the AM and PM times and get the number of hours the=20

    driver worked that=20
    >day. The IF function looks like this=E2?=A6=3DIF

    (E11>=3DF5,E11,"2.25"). F5 contains the=20
    >value 2.25, the check value. My problem is that the value=20

    2.25 is returned on=20
    >non data or an empty cell. The IF function evaluates non=20

    data or an empty=20
    >cell to be les than 2.25 thus returning 2.25 giving hours=20

    where there should=20
    >not be any for that time period.=20
    >Is there a way to create a validation that will ignore an=20

    empty cell until=20
    >data is supplied?
    >I apologize for this being so long winded.
    >
    >.
    >


  12. #12
    dvonj
    Guest

    RE: IF function problem

    Dave your a genius, that worked fine. It returns whatever is in cell E11.

    Thanks everyone for your assistance.

    "Dave Ramage" wrote:

    > Try this:
    >
    > =IF(ISNUMBER(E11),IF(E11>$E$5,E11,$E$11),"")
    >
    > If the value in E11 is non-numeric then an empty string is
    > returned. You could also use this to return zero instead:
    >
    > =IF(ISNUMBER(E11),IF(E11>$E$5,E11,$E$11),0)
    >
    > Cheers,
    > Dave
    > >-----Original Message-----
    > >This is a rather complex issue so I will understand if I

    > need to have a
    > >programmer take this on.
    > >Here goes, I need to keep track of driver total hours.

    > Drivers cannot work
    > >over a certain number of hours in a week. There are two

    > shifts an AM sign on
    > >and sign off time plus a PM sign on and sign off time. To

    > complicate this
    > >each driver is guaranteed a minimum of 2.25 hours for

    > both AM and PM shifts.
    > >I am using an IF function to validate the value of a cell

    > based on the amount
    > >of time for each shift. I use a formula to calculate the

    > difference between
    > >the sign off and sign on times and put that value in a

    > cell then check to see
    > >if the value meets certain conditions.
    > >
    > > If the value returned is grater than 2.25 I place the

    > grater value in
    > >another cell. If the value is less than 2.25 I place 2.25

    > in the cell. I then
    > >total the AM and PM times and get the number of hours the

    > driver worked that
    > >day. The IF function looks like thisâ?¦=IF

    > (E11>=F5,E11,"2.25"). F5 contains the
    > >value 2.25, the check value. My problem is that the value

    > 2.25 is returned on
    > >non data or an empty cell. The IF function evaluates non

    > data or an empty
    > >cell to be les than 2.25 thus returning 2.25 giving hours

    > where there should
    > >not be any for that time period.
    > >Is there a way to create a validation that will ignore an

    > empty cell until
    > >data is supplied?
    > >I apologize for this being so long winded.
    > >
    > >.
    > >

    >


+ 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