A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using the result of a IIF statement in a calculation



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2006, 05:07 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using the result of a IIF statement in a calculation

I created the following IIF statement

=IIf([CountOfCli File Name]51,"$225.00",IIf([CountOfCli File Name]=51 And
[CountOfCli File Name]=100,"$300.00",IIf([CountOfCli File Name]=101 And
[CountOfCli File Name]=250,"$400.00","$450.00")))

This works fine until I tried to use the result in another calculation. I
wanted to add this calculation to a SUMOf field by using the following

=Sum([=IIf([CountOfCli File Name]51,"$225.00",IIf([CountOfCli File
Name]=51 And [CountOfCli File Name]=100,"$300.00",IIf([CountOfCli File
Name]=101 And [CountOfCli File Name]=250,"$400.00","$450.00")))]+[SumOfSet
Up Fee])

Is this possible?
  #2  
Old March 24th, 2006, 05:31 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using the result of a IIF statement in a calculation

If you want the numbers to be treated as numbers, remove the
quotes and the dollar signs

also, the equal sign should just be at the beginning of the
equation

=Sum(IIf([CountOfCli File Name]51,225.00, ...

also, since the first IIF matching TRUE will be returned,
you can drop the range and just test for the high value

=Sum(IIf([CountOfCli File Name]51,225,IIf([CountOfCli File
Name]=100,300,IIf([CountOfCli File Name]=250,400,450))) )

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com


Lynn L wrote:
I created the following IIF statement

=IIf([CountOfCli File Name]51,"$225.00",IIf([CountOfCli File Name]=51 And
[CountOfCli File Name]=100,"$300.00",IIf([CountOfCli File Name]=101 And
[CountOfCli File Name]=250,"$400.00","$450.00")))

This works fine until I tried to use the result in another calculation. I
wanted to add this calculation to a SUMOf field by using the following

=Sum([=IIf([CountOfCli File Name]51,"$225.00",IIf([CountOfCli File
Name]=51 And [CountOfCli File Name]=100,"$300.00",IIf([CountOfCli File
Name]=101 And [CountOfCli File Name]=250,"$400.00","$450.00")))]+[SumOfSet
Up Fee])

Is this possible?

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Convert Figures into Text in Excel m_azim1 Worksheet Functions 3 April 5th, 2006 05:45 PM
Number format Mani K General Discussion 2 December 28th, 2005 11:01 AM
convert numbers to text bellman General Discussion 0 October 4th, 2005 10:28 PM
Conversion SVC Worksheet Functions 9 February 28th, 2005 02:29 PM
How do I use a rounded calculation result in another calculation? vnsrod2000 Worksheet Functions 1 January 26th, 2005 09:36 PM


All times are GMT +1. The time now is 02:30 AM.


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