Excel IF

Active Member
Hi

I have been racking my brains out on this for a almost a month, and am now in need of help!................

IF(D3>=DATE(1991,1,1),"",IF(E3>=DATE(1991,1,1),"")IF(F3="",(IF(E3="",DATEDIF(D3,DATE(1990,12,31),"d"),DATEDIF(E3,DATE(1990,12,31),"d"))),(IF(E3="",DATEDIF(D3,F3,"d"),DATEDIF(E3,F3,"d")))))

I realize that I have "IF" statements within "IF" statements BUT cannot get it to work........... I think I'm close.can anyone help thanks g

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Please explain what you'd like the formula to return

Even without knowing what you're trying to achieve, I can see a duplication in your formula.

Replace
Code:
``IF(D3>=DATE(1991,1,1),"",IF(E3>=DATE(1991,1,1),"")``

with
Code:
``IF(OR(D3>=DATE(1991,1,1),(E3>=DATE(1991,1,1)),"")``

Columns D E and F have Dates
Column N will be the year 1990 and Column O will 1991 etc etc until 2010

Column D and E are start Dates, Not all have a start date in Column E, so I need to check against that if no strt date in E then use strat date in D.

Column F is an end date .

What I am trying to accomplish is finding out the total amount of days between the start and end date, IF NO end date then assume Dec 31.

In the years columns I only want to report in "days" how many days, of course if in column F their is no end date I want to keep on counting those dates within each year.

End result I am attempting to accomplish, is over a 15 year period how many days experience PER YEAR

Eventually I will create an average when totaling Rows (about 150)

VBA is OK to if it works better, thnaks g

I'm not too sure where columns N and O come in, but maybe this?

=DATEDIF(IF(E3="",D3,E3),IF(F3="",DATE(N\$3,12,31),F3),"d")

Column N (the year 1990), will be where the formula resides, then repeated in Col. "O" through "AH"

tks g

Ok .......not Ashamed to say NOW I'm not only lost I don't even know where I'm standing!

Formulas look good .....I just can't bring it all together........I know JUST A TINY TINY littl ebit more than how top open up Excel, but everything is self taught through frustrations like this!

HELP!!!!!!!

tk sg

Replies
12
Views
240
Replies
12
Views
243
Replies
8
Views
203
Replies
2
Views
150
Replies
8
Views
362

1,211,678
Messages
6,103,239
Members
447,848
Latest member
holale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back