# Comparing Years

##### New Member
OK, here's a good one. I've been trying all kinds of formuals, nested IF statements and I'm just plain stumped!

Trying to compare birth/death date to census years. So imagine...

B1 = 1890 (birth)
B2 = 1975 (death)
A3 = 1850, A4 = 1860... (census years)

B3 cell would be formula to compare if A3 falls in between B1 and B2. Result would be either yes or no. Not sure what the best solution would be? IF with AND (which I've tried) or something completely different.

Suggestions?

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

#### barry houdini

##### MrExcel MVP
Try this formula in B3 copied down

=IF(AND(B\$1<=A3,B\$2>=A3),"Yes","No")

##### New Member
I believe you got it! Thanks so much!

Replies
6
Views
246
Replies
4
Views
234
Replies
7
Views
599
Replies
1
Views
625
Replies
9
Views
219

1,191,026
Messages
5,984,209
Members
439,878
Latest member
melodysc

### 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.

### Which adblocker are you using?

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