Date Formula Query

Quinton

Board Regular
Joined
Nov 6, 2008
Messages
125
Hello can you help on this one?

I have 2 dates in 2 cells as shown below:

Column A, Line 1 08-03-11
Column B, Line 1 27-06-11

I need a formula to show the following answer in column 3, Line 1: 3

The "3" is shown because the date 27-06-11 happens in the "3rd" month after 08-03-11.

Is there a formula I can use that can do the above?

Cheers,
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello can you help on this one?

I have 2 dates in 2 cells as shown below:

Column A, Line 1 08-03-11
Column B, Line 1 27-06-11

I need a formula to show the following answer in column 3, Line 1: 3

The "3" is shown because the date 27-06-11 happens in the "3rd" month after 08-03-11.

Is there a formula I can use that can do the above?

Cheers,
Maybe this...

=MONTH(B1)-MONTH(A1)

Format as General or Number
 
Upvote 0
Aaaah spoke too soon - apologies!!

The formula worked perfectly: =MONTH(D63)-MONTH(F63)

However for some lines the result shows "#value!". This is because some of the data will show <empty> because the data is imported from somewhere else.

Can you please amend the formula to show "0" instead of "#value!"?

Again many thanks in advance!!
 
Upvote 0
Aaaah spoke too soon - apologies!!

The formula worked perfectly: =MONTH(D63)-MONTH(F63)

However for some lines the result shows "#value!". This is because some of the data will show <EMPTY>because the data is imported from somewhere else.

Can you please amend the formula to show "0" instead of "#value!"?

Again many thanks in advance!!
This one will work in ANY version of Excel...

=IF(COUNT(D63,F3)<2,0,MONTH(D63)-MONTH(F63))
 
Upvote 0
Nearly there, apologies but I have 1 further formula request - as follows:

I have the following formula as show below:

=LOOKUP(2, 1/((Sdata!$A$1:$A$1000="Chestnut Grove\")*(Sdata!$B$1:$B$1000="Plot 02")),Sdata!$D$1:$D$1000)

Sometimes I get a result shown as "empty" <EMPTY>This is because the data found at that particular cell is "empty"<EMPTY>

When this happens can I get the result not to show "empty" <EMPTY>but to show "todays date"?

As always - Many, many thanks in advance!!!

Cheers,
 
Last edited:
Upvote 0
Nearly there, apologies but I have 1 further formula request - as follows:

I have the following formula as show below:

=LOOKUP(2, 1/((Sdata!$A$1:$A$1000="Chestnut Grove\")*(Sdata!$B$1:$B$1000="Plot 02")),Sdata!$D$1:$D$1000)

Sometimes I get a result shown as "empty" <EMPTY>This is because the data found at that particular cell is "empty"<EMPTY>

When this happens can I get the result not to show "empty" <EMPTY>but to show "todays date"?

As always - Many, many thanks in advance!!!

Cheers,
What exactly does "shown as empty" mean?

If the last cell in the range that meets the conditions is empty then that formula will return 0.

Is that what it's doing?
 
Upvote 0
Apologies for poor explaination!

empty is actually written in the cell itself. When this happens I would like it to not display empty but to show todays date instead - is this possible?

Cheers,
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,723
Members
452,939
Latest member
WCrawford

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