PC Review


Reply
Thread Tools Rate Thread

Combining results of IIf statements

 
 
=?Utf-8?B?QVBDaW5GbGE=?=
Guest
Posts: n/a
 
      23rd Jun 2006
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.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3ByaW5rcw==?=
Guest
Posts: n/a
 
      23rd Jun 2006
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.
>

 
Reply With Quote
 
BruceM
Guest
Posts: n/a
 
      23rd Jun 2006
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" <(E-Mail Removed)> wrote in message
news:B8F75CAB-843A-4F8A-97B1-(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
=?Utf-8?B?QVBDaW5GbGE=?=
Guest
Posts: n/a
 
      23rd Jun 2006
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.
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make this more efficient? (combining DataSet results with the results of a DB lookup.) Ken Fine Microsoft ASP .NET 3 23rd Jul 2008 09:11 AM
Combining IF statements =?Utf-8?B?TWFjbW8=?= Microsoft Excel Worksheet Functions 2 5th May 2006 05:17 AM
Combining two IIf statements =?Utf-8?B?dHJhaW5iaWY=?= Microsoft Access 5 18th Nov 2005 09:04 PM
Combining IF statements Excel-erate2004 Microsoft Excel Programming 10 31st May 2004 02:08 PM
Combining IF statements pow67 Microsoft Access 3 20th Aug 2003 04:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:39 PM.