Auto comments if dates match

cpereznj

New Member
Joined
Nov 27, 2012
Messages
19
Hi everyone, is there a way to add comments based on dates? I have a file with three sheets. The first is called "2018" and is used as a calendar for year 2018 and other data. The second is called "2019" and is used as a calendar for year 2019 and other data. The last one is called "'Events" and it contains a list of special events.
We need to add comments if the dates in the "2018" and "2019" worksheets match date dates in the "Events" worksheet. The comments should be placed in the corresponding "Day" column. The comment should be the event name in column A of the "Events" worksheet.
Thank you for the help.

2018 and 2019 Sample. It contains all the months and days in the year
[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]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]January[/TD]
[TD][/TD]
[TD][/TD]
[TD]February[/TD]
[TD][/TD]
[TD][/TD]
[TD]March[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Count[/TD]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Count[/TD]
[TD]Date[/TD]
[TD]Date[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]Thu[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]Thu[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tue[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wed[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]Sat[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]Sat[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thu[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]Sun[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]Sun[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Fri[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]Mon[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]Mon[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sat[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]Tue[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]Tue[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD]7[/TD]
[TD][/TD]
[TD]Wed[/TD]
[TD]7[/TD]
[TD][/TD]
[TD]Wed[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]Thu[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]Thu[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tue[/TD]
[TD]9[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]9[/TD]
[TD][/TD]
[TD]Fri[/TD]
[TD]9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wed[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]Sat[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]Sat[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Events Sample. There are approximately 50 events
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]2018[/TD]
[TD="align: center"]2019[/TD]
[TD="align: center"]2020[/TD]
[/TR]
[TR]
[TD]Event 1[/TD]
[TD]1/1/18[/TD]
[TD]1/1/19[/TD]
[TD]1/1/20[/TD]
[/TR]
[TR]
[TD]Event 2[/TD]
[TD]2/1/18[/TD]
[TD]2/1/19[/TD]
[TD]2/1/20[/TD]
[/TR]
[TR]
[TD]Event 3[/TD]
[TD]3/1/18[/TD]
[TD]3/1/19[/TD]
[TD]3/1/20[/TD]
[/TR]
[TR]
[TD]Event 4[/TD]
[TD]4/1/18[/TD]
[TD]4/1/19[/TD]
[TD]4/1/20[/TD]
[/TR]
[TR]
[TD]Event 5[/TD]
[TD]5/1/18[/TD]
[TD]5/1/19[/TD]
[TD]5/1/20[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi,

Could you please clarify what you mean? In this case, you'd like cell A4 in the Calendar sheet to indicate something based on cell B3 in the Events sheet?

Michael
 
Last edited:
Upvote 0
Michael,

The following is a list of comments and their corresponding cells.
"Events" A3 - Event 1 should be placed in "2018" A3. This is because the date in "2018" B3 matches the date in "Events" B3.
"Events" A4 - Event 2 should be placed in "2018" D3. This is because the date in "2018" E3 matches the date in "Events" B4.
"Events" A5 - Event 3 should be placed in "2018" G3. This is because the date in "2018" H3 matches the date in "Events" B5 and so forth.

Hope this clarifies your question. Thank you for the quick reply.

Cesar
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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