If and statement?

Pritstick

New Member
Joined
Mar 1, 2016
Messages
3
Hi All,
I need help with a formula. I have many rows of data containing crime numbers in column a, start date in b, end date in c and address in column d. Some of these addresses will be victims more than once. As such, is there any way of finding out where the crime start date and end date is the same and the address is a repeat address? I only want to include those offences that start and end on the same date and also appear more than once on the spreadsheet. I hope that make sense.
Thank you in advance.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi Pritstick,

In column E, cell E2 and drag down, try:

=countifs($B:$B,$B2,$C:$C,$C2,$D:$D,$D2)

Anything that is over 1 should be duplicate entries that have the same address, start date and end date.
Simply filter on column E to see your results.

I hope that helps!
Dan.

Edit: After re-reading, you may have needed the Start and End date the same date (01/01/2016) and the address duplicated.
If that's the case:

=if(and($B2=$C2,countif($D:$D,$D2)>1),"Duplicate","Non-Duplicate")

Fingers crossed that works.
 
Last edited:
Upvote 0
Yes, the start and end dates. You could have crime 1 that occurred between 01/01/16 and 12/01/16 at 1 high street. If another crime occurred at the same address between 12/03/15 and 14/03/15 I want to exclude it from my results but if took place between 1st and 16th Jan 16 again, then I need to include it.
I hope your formula works too!
Thank you.
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,122
Members
452,381
Latest member
Nova88

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