Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Combining results of IIf statements

Discussion in 'Information Technology' started by APCinFla, Jul 28, 2006.

  1. APCinFla

    APCinFla
    Expand Collapse
    Guest

    Is there a way to possibly combine the results of IIf statements, seperating
    the results of the statements by commas in one text box. Basically I have
    eight IIf statements that I am running and I am trying to get the results
    listed together in one text box.

    Example: Result 1, Result 2, Result 3, Result 4, Result 5, Result 6, Result
    7, Result 8.

    I was able to get this to work only if all 8 IIf statements were true for
    the record I am working on. If the record has at least one false IIf
    statement then the entire box comes back with only a -1 in it. If the IIf
    statement produces a false value I just want it to go on to the next
    statement and just list all the results that are true.

    Is this possible? Should I be using something besides IIf statements?

    Thanks.
     
  2. Loading...


  3. Sprinks

    Sprinks
    Expand Collapse
    Guest

    You can concatenate your results using the & operator, for example:

    =IIf("x"="x","T","F") & "," & IIf("x"="y","T","F") will display:

    T,F

    Hope that helps.
    Sprinks

    "APCinFla" wrote:

    > Is there a way to possibly combine the results of IIf statements, seperating
    > the results of the statements by commas in one text box. Basically I have
    > eight IIf statements that I am running and I am trying to get the results
    > listed together in one text box.
    >
    > Example: Result 1, Result 2, Result 3, Result 4, Result 5, Result 6, Result
    > 7, Result 8.
    >
    > I was able to get this to work only if all 8 IIf statements were true for
    > the record I am working on. If the record has at least one false IIf
    > statement then the entire box comes back with only a -1 in it. If the IIf
    > statement produces a false value I just want it to go on to the next
    > statement and just list all the results that are true.
    >
    > Is this possible? Should I be using something besides IIf statements?
    >
    > Thanks.
    >
     
  4. BruceM

    BruceM
    Expand Collapse
    Guest

    If you still need help with this after trying the other suggestion, it would
    help if you post some version of the IIf statement. You don't need all
    eight results to illustrate your point; three or four should be plenty.

    "APCinFla" <APCinFla@discussions.microsoft.com> wrote in message
    news:B8F75CAB-843A-4F8A-97B1-1E4A48625CE3@microsoft.com...
    > Is there a way to possibly combine the results of IIf statements,
    > seperating
    > the results of the statements by commas in one text box. Basically I have
    > eight IIf statements that I am running and I am trying to get the results
    > listed together in one text box.
    >
    > Example: Result 1, Result 2, Result 3, Result 4, Result 5, Result 6,
    > Result
    > 7, Result 8.
    >
    > I was able to get this to work only if all 8 IIf statements were true for
    > the record I am working on. If the record has at least one false IIf
    > statement then the entire box comes back with only a -1 in it. If the IIf
    > statement produces a false value I just want it to go on to the next
    > statement and just list all the results that are true.
    >
    > Is this possible? Should I be using something besides IIf statements?
    >
    > Thanks.
    >
     
  5. APCinFla

    APCinFla
    Expand Collapse
    Guest

    Thanks, it worked. I was using the "+" sign instead of the "&". Thanks again!

    "Sprinks" wrote:

    > You can concatenate your results using the & operator, for example:
    >
    > =IIf("x"="x","T","F") & "," & IIf("x"="y","T","F") will display:
    >
    > T,F
    >
    > Hope that helps.
    > Sprinks
    >
    > "APCinFla" wrote:
    >
    > > Is there a way to possibly combine the results of IIf statements, seperating
    > > the results of the statements by commas in one text box. Basically I have
    > > eight IIf statements that I am running and I am trying to get the results
    > > listed together in one text box.
    > >
    > > Example: Result 1, Result 2, Result 3, Result 4, Result 5, Result 6, Result
    > > 7, Result 8.
    > >
    > > I was able to get this to work only if all 8 IIf statements were true for
    > > the record I am working on. If the record has at least one false IIf
    > > statement then the entire box comes back with only a -1 in it. If the IIf
    > > statement produces a false value I just want it to go on to the next
    > > statement and just list all the results that are true.
    > >
    > > Is this possible? Should I be using something besides IIf statements?
    > >
    > > Thanks.
    > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page