Tricky Excel Formula

Quinton

Board Regular
Joined
Nov 6, 2008
Messages
125
Hello I need the following formula from someone clever!

example data below

column a column b column c
26-05-11 10-03-11 1
17-06-11 23-06-11 1
13-02-11 22-06-11 0

Column C is the formula I require. It is counting 1 or 0 if the following applies:

If column B's date happens before column A's date then count 1
If column B's date happens within the same month of Column A's Month then count 1
If Column B's date happens in the following month or any forther months (example row 3) on Column A's date then count 0

Good luck!

Thanks

Quinton
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
nevermind, try
weird, won't show my formula-
=IF(OR(B1<(A1),<a1,month(b1)=<a1,month(b1)
MONTH(B1)=MONTH(A1)),1,0)</a1,month(b1)=<a1,month(b1)
 
Last edited:
Upvote 0
Try

Excel Workbook
ABC
126/05/201110/03/20111
217/06/201123/06/20111
313/02/201122/06/20110
Sheet5
 
Upvote 0
How about:

Excel Workbook
ABC
126/05/201110/03/20111
217/06/201123/06/20111
313/02/201122/06/20110
Sheet1



... you may need to tick the Analysis Toolpak add-in, depending on which version of Excel you have.
 
Upvote 0
Many thanks for your help.

I don't think there is another option? But if there is then count 0

many thanks
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,769
Members
452,941
Latest member
Greayliams

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