IIF Function 03-12-08

I need to use an If statement in a field in my query, here's what I need it 
to do:  If field name "PYE" equals "12/31" then insert "1/1" or If field name 
"PYE" equals "11/31" then insert "12/1" or If field name "PYE" equals "10/31" 
then insert "11/1".  

So far I have this Exp: IIF([PYE]= "12/31", "1/1", "") it works for the 
PYE's that are 12/31, but I can't figure out how to use the or part.  Any 
suggestions?
0
Utf
3/12/2008 6:31:07 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
1499 Views

Similar Articles

[PageSpeed] 0

Use nested IIFs like this ---
IIF([PYE]= "12/31", "1/1", IIF([PYE]= "10/31", "11/1",  "")) 

-- 
KARL DEWEY
Build a little - Test a little


"Suzanne" wrote:

> I need to use an If statement in a field in my query, here's what I need it 
> to do:  If field name "PYE" equals "12/31" then insert "1/1" or If field name 
> "PYE" equals "11/31" then insert "12/1" or If field name "PYE" equals "10/31" 
> then insert "11/1".  
> 
> So far I have this Exp: IIF([PYE]= "12/31", "1/1", "") it works for the 
> PYE's that are 12/31, but I can't figure out how to use the or part.  Any 
> suggestions?
0
Utf
3/12/2008 6:38:01 PM
Reply:

Similar Artilces:

Crystal Reports 9.2.2 03-30-05
Hi. I want to know if i need to have crystal 9.2.2 to customize/create new reports to mscrm. I have the version 10, but i get some errors when i put them in mscrm using the report manager. If someone can help me i'm thankful. if it's necessary the version 9.2.2, where i can find it??? you would need a version 9 license. You can then contact businessobjectds.com and they will send a 9.2.2 download. Version 10 should work but you cannot publish directly to the crm web server. As you have 10.0 businessobjects may let you have the 9.2.2 version however they may also say you have to g...

COUNTIF Function 04-19-10
I am trying to use the countif function by rows and it is not calculationg correctly. I try to drag the formula down and it just repeats the same value as the origin cell. Is there some type of malfunction with tis function? It would help immensely if you had posted your formula for us to evaluate. Without it, my best guess would be that your formula currently looks something like: =COUNTIF($1:$1,"My value") when it should be: =COUNTIF(1:1,"My value") -- Best Regards, Luke M "csmith13" <csmith13@discussions.microsoft.com> wrote in me...

sumif function #8
i have 2columns A1 a2 a 8 b 5 a 3 c 2 c 1 I am trying to sum the a2 col if a1 =a,b, or c I was using sumif but not getting the right answer, is this the righ function?? if so whats the format of the formul -- Message posted from http://www.ExcelForum.com Hi try =SUMPRODUCT(--(A1:A100={"a","b","c"}),B1:B100) -- Regards Frank Kabel Frankfurt, Germany > i have 2columns > A1 a2 > a 8 > b ...

Reading in ReadFile function can't be done through COM port
Hello, I try to transfer file(in .txt format) from my test PC to my working PC through serial port(COM port). One pc I open hyper terminal and set a connection in 9600(baud)-8(data bit)-none(parity)-1(stop bit)-none(flow control).In another PC I write the code below in vc++ 6.0. I select Transfer->Send Text File and open a text file in my test PC. Then I run this code in my working PC. Altough ReadFile function doesn't get error message. dwBytesRead shows 0 during reading and text in text file does not transfer to MyBuffer. My code is : ///////////////////////////...

VBA Dir () function
Hi every one, I use the following code to find and populate a combobox with *.ppt files myfile=Dir(file pathe\+"*.ppt") but this return not only *.ppt file but also *.pptx file ! Anything I'm missing here? Thanks for help. -- Best regards, Edward I believe that is by default. because you used *.ppt it will return all files where the file extension begins with ppt. -- Michael Koerner MS MVP - PowerPoint "Edward" <Edward@discussions.microsoft.com> wrote in message news:7CAEDF5E-0C71-443B-9F25-DB163C2739DC@microsoft.com... > Hi e...

Security Question 08-26-06
I am looking for a way to resolve this security issue. I have a person that will create contract records (custom entity, not base contract entity)records for two different areas. We want to be able to limit who can see these records based on a field (picklist) on the contract. For example, Jan in the legal department will be creating Legal and Sales contracts. The sales people should only see sales contracts and the legal people only legal contracts. I know I limit the security by access within a BU and assigning roles. But Jan is creating records for her BU (legal) and another BU (sal...

Help with function, not sure which one
I don't want to use a macro...is it possible to do the following with functions? New York Joe Tim Kim Jane San Diego Tim Jane St Louis Joe Tim Kim If I enter New York I want excel to return Joe, Tim, Kim, Jane in a cell by looking at the table above which will be in the same worksheet If I enter St Louis I want it to Return Joe, Tim, Kim in a cell by looking at the above etc. Thanks so much I am having a hard time deciding where to st...

Functions & Tab Names
My question is simple. Does anyone out here know of a function that returns the name of a specific TAB in a workbook? I only know of a trick formula that will return the value of the sheet the formula is entered into: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256) What did you have in mind? How would you envision this function working? What are your requirements? -- "Actually, I *am* a rocket scientist." -- JB (www.MadRocketScientist.com) Your feedback is appreciated, click YES if this post helped you. "...

Earn $200 per day without a website
Tired of wasting your time & hard earned money on "intelligent" programs which promise to make you rich overnight? Then read on, because I am going to show you............. How I made over $2000 in just 10 days using a ridiculously stupid technique I stole from my own affiliate Click the following link to see the entire procedure explained step-by- step. http://www.showroute.com/odp I Got MY Own ATM. J http://www.showroute.com/odp ...

error 0xe0000206 from SetupDiOpenClassRegKey function in Windows 7
This problem happens only on Windows 7. When I call this function to open a class registry key, it returns 0xe0000206. It does not happen with older versions like XP or Vista. Thanks in advance "sreekku" <sreekku@discussions.microsoft.com> wrote in message news:D1A4AF91-0A00-4751-BB62-2685581421B0@microsoft.com... > This problem happens only on Windows 7. When I call this function to open > a > class registry key, it returns 0xe0000206. It does not happen with older > versions like XP or Vista. 0xe0000206 = ERROR_INVALID_CLASS What class are...

Countif function using times
Hello All, I'm using Windows and Excel XP. I am trying to count the number of occurences of times in a certain range. For example: A ----------------------- 1 0:15:03 (0 hours, 15 minutes and 3 seconds) 2 0:22:45 3 0:17:33 4 0:13:22 5 0:21:00 6 0:16:01 I would like to find the number of occurences that fall between the times of 0:15:00 and 20:00 (which would be 3). I am having a problem writing the formula =COUNTIF(A1:A6,">=0:15:00<0:20:00"). It is returning the #VALUE! error. Not sure i...

INTERNET 03-27-07
When trying to access internet I received a message stating cannot access whilst offline. This message locks the window so I have to use control alt and delete to clear. How can I stop this happening? Hi, David.> When trying to access internet I received a message stating cannot access > whilst offline. This message locks the window so I have to use control > alt and delete to clear. How can I stop this happening?Select the File -> Work Offline menu to uncheck it. If this doesn't help, consider that you posted your question in the Microsoft Access database newsgroup, di...

Cell call out 03-01-10
Hi, I have a spread sheet that when you put your pointer on that cell you get a tip, it is not a comment, how do I edit that? Thanks Still data|validation. Barry wrote: > > Hi, I have a spread sheet that when you put your pointer on that cell you get > a tip, it is not a comment, how do I edit that? Thanks -- Dave Peterson Many thanks Dave! "Dave Peterson" wrote: > Still data|validation. > > Barry wrote: > > > > Hi, I have a spread sheet that when you put your pointer on that cell you get > > a tip, it is not a com...

Domain and forest functional level RODC
Hello I am reading http://technet.microsoft.com/en-us/library/cc731243(WS.10).aspx and it says the FFL and DFL need to be at windows 2003 or higher to support a RODC, I was under the impression that the DFL and FFL needed to be at windows 2008 in order to support RODC's. Can someone please confirm what level AD needs to be at in order to support a RODC? and what DFL and FFL needs to be in place to support fine-grained password policies ? Many thanks for the clarification Hello Sawyer, No, you need at least one Windows server 2008 RWDC to add a RODC. That's al...

If value in cell Then perform function #2
Hi Guys Many thanks for the solutions - they both work! Emm -- emm808 ----------------------------------------------------------------------- emm8080's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1185 View this thread: http://www.excelforum.com/showthread.php?threadid=27483 ...

Function to determine formula or static content in cell
Is there an Excel function, or one that I could easily create in VBA that would determine if a cell contains a formula or user-entered data I am facing a problem with circular references and I think if I can d this then I might be able to dynamically avoid the problem arising. Thanks for help you might be able to give -- Message posted from http://www.ExcelForum.com Hi you may try the following UDF (put in a module of your workbook) Function is_formula(rng As Range) is_formula = rng.HasFormula End Function use it like =IS_FORMULA(A2) Note: not much error checking included (e.g. mult...

Extend Rows and related formula downwards using functions not macros
I have a simple worksheet to amortise a loan. I would like to use a formula to extend the rows downwards to the number of payments (Number of years x Number of payments per year) using a formula. For example, if there were 26 payments per year over 1 year, there should be 26 rows. Now if I change the number of years to 2 years, two things should happen: 1. The number of rows should expand to 52 from 26 2. The sum of the interest paid should include these extra rows.i.e =Sum(rownumber 1 to row number 52) instead of Sum (rownumber 1 to rownumber 26). Currently I am using a simple formula alon...

Hyperlink created in Access does not function when printed to pdf
I have a database in Access 2007 in which I created a field that hyperlinks to Google Maps for an office location. In Access database, the hyperlink works perfectly. When I print the report to Adobe PDF, the link cannot be accessed. I have a similar field that opens our e-mail program and generates an e-mail. THAT works, but the hyperlink does not. I hope this makes sense. Thanks in advance. You could use a different pdf printer driver. For example win2pdf will take any text that looks like a hyperlink and change it to an actual hyperlink in the pdf file. I assume t...

windows vista 02-06-08
I can not reset the size of my fonts, etc. on any page that comes up On Wed, 6 Feb 2008 01:42:22 -0800, "barbara" <lefdalbarbara@clearwire.net> wrote: >I can not reset the size of my fonts, etc. on any page that comes up Please repost in a newsgroup supporting Windows Vista. This group is for the database software Microsoft Access. John W. Vinson [MVP] ...

Net Framework 08-31-10
I am having a problem with the Windows update sight in that it continually wants to download updates for Net framework. It has already succuesfully downloaded them several times but continues to tell me they need to be downloaded. Update site shows succuesful downloads no failures. I have deleted all versions of NF and redownloaded. Apart from "hiding" these updates any ideas ? BC wrote: > I am having a problem with the Windows update sight in that it continually > wants to download updates for Net framework. It has already succuesfully > downloaded them severa...

INDEX and MATCH 12-08-09
Hi, Excel 2003: I have a column of figures in ascending order (can't be reveresed) I'm trying to use INDEX and MATCH to find a value that is MORE THAN or equal to a lookup_value. (and then to pick an adjacent cell value) MATCH works great to recover the LESS THAN or equal value. Is there another formula that I should be using? TIA Phil Try this array formula** : D2 = lookup value =IF(D2>MAX(A1:A10),"out of range",INDEX(B1:B10,MATCH(TRUE,A1:A10>=D2,0))) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER...

PMT function algorithm
Hi, Could anybody explain me in details how excel evaluates payment rate in PMT function please. Thanx gacu@poczta.onet.pl It's the interest rate per period. If you specify the number of periods as number of monthly, you need to use a monthly interest rate (APR/12). On Sat, 23 Oct 2004 20:06:58 +0200, "Gacu" <gacu@poczta.onet.pl> wrote: >Hi, > >Could anybody explain me in details how excel evaluates payment rate in PMT >function please. > > > >Thanx >gacu@poczta.onet.pl > I believe the formula used is (Principle * i * (1+i)^n) )...

Using Arrays With IF functions
Hi all, I am running into a problem. I am trying to sum values in a table using arrays and I get the VALUE error. My formula is something like this. {=SUM((A1:A10=A15)*(B1:B10=B15)*(C1:C10))} The values in A1:A10 and B1:B10 are manually inputted. The C1:C10 are calculated using an IF functions and has some greater than, less than equations within. My goal is to get the A and B columns to equal TRUE and then multiply the C column and the Sum them all together. I think my problem is the C column but not sure. Can this error be cause by the IF function? I even tried making a new table, linki...

d 11-14-03
d ...

add simple spreadsheeting functionality to OneNote, please
---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/community/en-us/default.mspx?mid=25e17d76-ceb8-4560-a55e-bbcf8b348ec0&dg=microsoft.public.office.misc Why, they already supply Excel in that Office suite. Neil wrote: ...