If Statement Date comparison, Month count

PantherTheCat

New Member
Joined
Mar 22, 2011
Messages
3
I have been trying to no avail, to be able to find out, how long an account has been active within the time frame of a certain year.

I created a formula to change all the start dates to 1/1/2010

I now need to find out if they had an end date, and if so, how many months they were active in a year.

Here is some examples of what the sheet looks like .


1/1/2010 9/9/2010 9/10/2010 8
1/1/2010 9/9/2010 9/10/2010 8
10/26/2010 10/30/2010 #NUM!
10/26/2010 11/1/2010 #NUM!
10/26/2010 11/1/2010 #NUM!
1/1/2010 2/1/2009 #NUM!
6/15/2010 10/12/2010 #NUM!
1/1/2010 #NUM!

Here is the formula i am using that is returning Dates
=IF(AND(DATEDIF(E183,F183,"m")<=11,(DATEDIF(E183,F183,"m")<>"")),(DATEDIF(E183,F183,"m")),(0))

Which clearly isnt working - If you notice the #num!

I also tried a formula to compare that to an Error.type 6

That did not work.

Ultimately if there is an easier way to take all the dates, determine between 4 columns How many months the site has been active in 2010, that would be great.

Column 1
Site Active in 2010
Column 2
Old software deactivated in 2010
Column 3
New Software Activated in 2010
Column 4
New Software deactivated in 2010

Everything but Column 1 has the possibility of not having a date in it. Which throws off the entire deal.

I have been trying to figure this out the past 2 days. Honestly by now I could have just manually done the calculations by hand - but i have a feeling that this will come up again and would love some insight.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi and welcome. In your example data, it's hard to tell what columns each data element belongs to. Because of that, it's hard to follow what you are calculating.

If you could paste your example data using one of these add-ins...
MrExcel HTML Maker or Excel Jeanie
...that would help a lot.

I'm not sure I follow what you are asking, but here's a guess with some made-up data.
Excel Workbook
ABCDE
1Start OldEnd OldStart NewEnd NewMonths in 2010
21/1/20099/9/20094/10/20109/11/20105
32/1/20104/2/20104/3/20101/4/201110
43/3/20106/4/20103
52/1/20094/2/20103
61/1/20099/9/20091/10/20113/22/20110
Sheet
 
Upvote 0
I apologize for not utilizing the correct tool.

And yes that is EXACTLY what I am talking about, your example graph appears just as I want the data to appear.
 
Upvote 0
Okay, it did not work, the dates that had good ranges came back with #num!

Also i dont think the formula allows for multiple blanks

Such as a Start Date of 2/3/2009 and then no other dates (Meaning that it has been active and not upgraded)

Now i filled in that if they had Anything in Column A and nothing in any other coumn to DATEDif((a1),Date(2011,1,1),"m")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top