+ Reply to Thread
Results 1 to 7 of 7

conditional formula to show "open" or "closed"

  1. #1
    SBS
    Guest

    conditional formula to show "open" or "closed"

    Hi,
    I have been able to do a formula that provides a random number in a cell
    (C6). Upon entering a matching number in another cell (G6), I want to have a
    message ("closed") appear in yet another cell (A1) or if a non-matching
    number is entered the message in cell (A1) would be ("open").

    Am new to formulas and have not been able to figure out what to do from the
    office help instructions.

    so far I have a non-working formula:
    =IF(g6=C6,"closed","open")




  2. #2
    JMB
    Guest

    RE: conditional formula to show "open" or "closed"

    I don't see any problem w/your formula. Are you getting an error or just an
    incorrect result? Are you sure G6=C6? Try increasing the number of decimals
    in each cell to be sure you don't have any rounding issues. You may have to
    incorporate the Round function in your formula if this is the case.



    "SBS" wrote:

    > Hi,
    > I have been able to do a formula that provides a random number in a cell
    > (C6). Upon entering a matching number in another cell (G6), I want to have a
    > message ("closed") appear in yet another cell (A1) or if a non-matching
    > number is entered the message in cell (A1) would be ("open").
    >
    > Am new to formulas and have not been able to figure out what to do from the
    > office help instructions.
    >
    > so far I have a non-working formula:
    > =IF(g6=C6,"closed","open")
    >
    >
    >


  3. #3
    Biff
    Guest

    Re: conditional formula to show "open" or "closed"

    Hi!

    One way:

    =IF(AND(ISNUMBER(G6),G6=C6),"Closed","Open")

    > so far I have a non-working formula:
    > =IF(g6=C6,"closed","open")


    If G6=C6 and your formula does not work it's possible that your numbers are
    not numbers but are TEXT.

    Biff

    "SBS" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I have been able to do a formula that provides a random number in a cell
    > (C6). Upon entering a matching number in another cell (G6), I want to have
    > a
    > message ("closed") appear in yet another cell (A1) or if a non-matching
    > number is entered the message in cell (A1) would be ("open").
    >
    > Am new to formulas and have not been able to figure out what to do from
    > the
    > office help instructions.
    >
    > so far I have a non-working formula:
    > =IF(g6=C6,"closed","open")
    >
    >
    >




  4. #4
    SBS
    Guest

    Re: conditional formula to show "open" or "closed"

    Thank you JMB and Bif,

    Whether I enter a non-equal or an equal number into G6, I only get the
    "open" message. If the formula was working, I would expect to see a change in
    the A1 message (either open or closed) depending upon the actual number
    entered into G6. I have checked that the cells are formated as number instead
    of text but my results still do not work.

    "Biff" wrote:

    > Hi!
    >
    > One way:
    >
    > =IF(AND(ISNUMBER(G6),G6=C6),"Closed","Open")
    >
    > > so far I have a non-working formula:
    > > =IF(g6=C6,"closed","open")

    >
    > If G6=C6 and your formula does not work it's possible that your numbers are
    > not numbers but are TEXT.
    >
    > Biff
    >
    > "SBS" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > > I have been able to do a formula that provides a random number in a cell
    > > (C6). Upon entering a matching number in another cell (G6), I want to have
    > > a
    > > message ("closed") appear in yet another cell (A1) or if a non-matching
    > > number is entered the message in cell (A1) would be ("open").
    > >
    > > Am new to formulas and have not been able to figure out what to do from
    > > the
    > > office help instructions.
    > >
    > > so far I have a non-working formula:
    > > =IF(g6=C6,"closed","open")
    > >
    > >
    > >

    >
    >
    >


  5. #5
    Biff
    Guest

    Re: conditional formula to show "open" or "closed"

    Ok, start troubleshooting.........

    Try these formulas:

    =G6=C6
    =ISNUMBER(G6)
    =ISNUMBER(C6)
    =LEN(G6)
    =LEN(C6)

    If G6=C6 and BOTH are numeric numbers the results of the first 3 formulas
    should be TRUE. The results of the last 2 formulas should be identical.

    Biff

    "SBS" <[email protected]> wrote in message
    news:[email protected]...
    > Thank you JMB and Bif,
    >
    > Whether I enter a non-equal or an equal number into G6, I only get the
    > "open" message. If the formula was working, I would expect to see a change
    > in
    > the A1 message (either open or closed) depending upon the actual number
    > entered into G6. I have checked that the cells are formated as number
    > instead
    > of text but my results still do not work.
    >
    > "Biff" wrote:
    >
    >> Hi!
    >>
    >> One way:
    >>
    >> =IF(AND(ISNUMBER(G6),G6=C6),"Closed","Open")
    >>
    >> > so far I have a non-working formula:
    >> > =IF(g6=C6,"closed","open")

    >>
    >> If G6=C6 and your formula does not work it's possible that your numbers
    >> are
    >> not numbers but are TEXT.
    >>
    >> Biff
    >>
    >> "SBS" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Hi,
    >> > I have been able to do a formula that provides a random number in a
    >> > cell
    >> > (C6). Upon entering a matching number in another cell (G6), I want to
    >> > have
    >> > a
    >> > message ("closed") appear in yet another cell (A1) or if a non-matching
    >> > number is entered the message in cell (A1) would be ("open").
    >> >
    >> > Am new to formulas and have not been able to figure out what to do from
    >> > the
    >> > office help instructions.
    >> >
    >> > so far I have a non-working formula:
    >> > =IF(g6=C6,"closed","open")
    >> >
    >> >
    >> >

    >>
    >>
    >>




  6. #6
    Jerry W. Lewis
    Guest

    Re: conditional formula to show "open" or "closed"

    =G6=C6
    is not sufficient to test for equality of floating point numbers; you need
    =(G6-C6)=0
    where the parentheses are critical; otherwise equality may be declared
    dispite differences in the lowest order bits. There can be differences that
    Excel will not display, given MS's decision not to display more than 15
    significant digits.

    If the cells are both numeric and nominally equal (but not equal per this
    test), the OP should try either rounding both in his formula or testing for a
    suitably small difference.

    Jerry

    "Biff" wrote:

    > Ok, start troubleshooting.........
    >
    > Try these formulas:
    >
    > =G6=C6
    > =ISNUMBER(G6)
    > =ISNUMBER(C6)
    > =LEN(G6)
    > =LEN(C6)
    >
    > If G6=C6 and BOTH are numeric numbers the results of the first 3 formulas
    > should be TRUE. The results of the last 2 formulas should be identical.
    >
    > Biff
    >
    > "SBS" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you JMB and Bif,
    > >
    > > Whether I enter a non-equal or an equal number into G6, I only get the
    > > "open" message. If the formula was working, I would expect to see a change
    > > in
    > > the A1 message (either open or closed) depending upon the actual number
    > > entered into G6. I have checked that the cells are formated as number
    > > instead
    > > of text but my results still do not work.
    > >
    > > "Biff" wrote:
    > >
    > >> Hi!
    > >>
    > >> One way:
    > >>
    > >> =IF(AND(ISNUMBER(G6),G6=C6),"Closed","Open")
    > >>
    > >> > so far I have a non-working formula:
    > >> > =IF(g6=C6,"closed","open")
    > >>
    > >> If G6=C6 and your formula does not work it's possible that your numbers
    > >> are
    > >> not numbers but are TEXT.
    > >>
    > >> Biff
    > >>
    > >> "SBS" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > Hi,
    > >> > I have been able to do a formula that provides a random number in a
    > >> > cell
    > >> > (C6). Upon entering a matching number in another cell (G6), I want to
    > >> > have
    > >> > a
    > >> > message ("closed") appear in yet another cell (A1) or if a non-matching
    > >> > number is entered the message in cell (A1) would be ("open").
    > >> >
    > >> > Am new to formulas and have not been able to figure out what to do from
    > >> > the
    > >> > office help instructions.
    > >> >
    > >> > so far I have a non-working formula:
    > >> > =IF(g6=C6,"closed","open")
    > >> >
    > >> >
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >


  7. #7
    Biff
    Guest

    Re: conditional formula to show "open" or "closed"

    >If the cells are both numeric and nominally equal

    Nominally equal ?

    I didn't know that equality had a gray area! <g>

    Biff

    "Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote in message
    news:[email protected]...
    > =G6=C6
    > is not sufficient to test for equality of floating point numbers; you need
    > =(G6-C6)=0
    > where the parentheses are critical; otherwise equality may be declared
    > dispite differences in the lowest order bits. There can be differences
    > that
    > Excel will not display, given MS's decision not to display more than 15
    > significant digits.
    >
    > If the cells are both numeric and nominally equal (but not equal per this
    > test), the OP should try either rounding both in his formula or testing
    > for a
    > suitably small difference.
    >
    > Jerry
    >
    > "Biff" wrote:
    >
    >> Ok, start troubleshooting.........
    >>
    >> Try these formulas:
    >>
    >> =G6=C6
    >> =ISNUMBER(G6)
    >> =ISNUMBER(C6)
    >> =LEN(G6)
    >> =LEN(C6)
    >>
    >> If G6=C6 and BOTH are numeric numbers the results of the first 3 formulas
    >> should be TRUE. The results of the last 2 formulas should be identical.
    >>
    >> Biff
    >>
    >> "SBS" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Thank you JMB and Bif,
    >> >
    >> > Whether I enter a non-equal or an equal number into G6, I only get the
    >> > "open" message. If the formula was working, I would expect to see a
    >> > change
    >> > in
    >> > the A1 message (either open or closed) depending upon the actual number
    >> > entered into G6. I have checked that the cells are formated as number
    >> > instead
    >> > of text but my results still do not work.
    >> >
    >> > "Biff" wrote:
    >> >
    >> >> Hi!
    >> >>
    >> >> One way:
    >> >>
    >> >> =IF(AND(ISNUMBER(G6),G6=C6),"Closed","Open")
    >> >>
    >> >> > so far I have a non-working formula:
    >> >> > =IF(g6=C6,"closed","open")
    >> >>
    >> >> If G6=C6 and your formula does not work it's possible that your
    >> >> numbers
    >> >> are
    >> >> not numbers but are TEXT.
    >> >>
    >> >> Biff
    >> >>
    >> >> "SBS" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > Hi,
    >> >> > I have been able to do a formula that provides a random number in a
    >> >> > cell
    >> >> > (C6). Upon entering a matching number in another cell (G6), I want
    >> >> > to
    >> >> > have
    >> >> > a
    >> >> > message ("closed") appear in yet another cell (A1) or if a
    >> >> > non-matching
    >> >> > number is entered the message in cell (A1) would be ("open").
    >> >> >
    >> >> > Am new to formulas and have not been able to figure out what to do
    >> >> > from
    >> >> > the
    >> >> > office help instructions.
    >> >> >
    >> >> > so far I have a non-working formula:
    >> >> > =IF(g6=C6,"closed","open")
    >> >> >
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




+ 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