Excel formula based on Date input

crave4excel

New Member
Joined
Feb 2, 2012
Messages
45
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]From[/TD]
[TD]To[/TD]
[TD]Jan 1[/TD]
[TD]Feb 1[/TD]
[TD]Mar 1[/TD]
[TD]Apr 1[/TD]
[TD]May 1[/TD]
[/TR]
[TR]
[TD]Feb 1[/TD]
[TD]Mar 15[/TD]
[TD]no[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]no[/TD]
[TD]no[/TD]
[/TR]
[TR]
[TD]Feb 15[/TD]
[TD]Apr 30[/TD]
[TD]no[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]no[/TD]
[/TR]
</tbody>[/TABLE]

Hello
I have a table similar to above. I want to come up with a formula to populate "yes" or "no" from column C3:G4, based on dates entered in column A:B (in red).

Any ideas?

Appreciated.
 
Last edited:
If I understand correctly, Now you're comparing the Week?
This will work, I'm using the "Default", where Sunday is the beginning of each week.

Excel 2010
ABCDEFG
fromto
NoYesYesYesNo

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]9-Apr[/TD]
[TD="align: right"]16-Apr[/TD]
[TD="align: right"]23-Apr[/TD]
[TD="align: right"]30-Apr[/TD]
[TD="align: right"]7-May[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]17-Apr[/TD]
[TD="align: right"]30-Apr[/TD]

</tbody>
Sheet6

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=IF(AND(WEEKNUM(C$1)>=WEEKNUM($A2),WEEKNUM(C$1)<=WEEKNUM($B2)),"Yes","No")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

You are a genius. Thank you!
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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