Access Expression/formula question

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
1,744
Office Version
  1. 365
Platform
  1. Windows
Whats wrong with this formula? it will not let me enter it. But I am not seeing where the problem is.

Submitted_Late: IIf([[PDIR Completed] Is Null,"",IIf([PDIR Completed] > [PDIR Due Date] ,DateSerial(Year([PDIR Submission Date]),Month([PDIR Due Date])+1,1)-1),"")

I am checking first to see if I have a date in the PDIR Completed field. If I do then I want to see if that date is greater than the date in the PDIR Due Date Field. If it is, then I want to do a "Eomonth" formula to enter the PDIR Due Date
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,494
Office Version
  1. 365
Platform
  1. Windows
For one thing, you have double square brackets:
Submitted_Late: IIf([[...
 

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
1,744
Office Version
  1. 365
Platform
  1. Windows
Submitted_Late: IIf([PDIR Completed] Is Null,"",IIf([PDIR Completed] > [PDIR Due Date] ,DateSerial(Year([PDIR Submission Date]),Month([PDIR Due Date])+1,1)-1,""))

Thanks Joe4
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,494
Office Version
  1. 365
Platform
  1. Windows
So, did that solve the issue, or is there still other problems with the formula?
 

Watch MrExcel Video

Forum statistics

Threads
1,109,380
Messages
5,528,357
Members
409,817
Latest member
JiNXX9500

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top