Fill cells with data based on dates?

tezza

Active Member
Joined
Sep 10, 2006
Messages
375
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
  2. Web
Hi All,

Hope you can help.

I've created a dynamic calendar but would like it to auto populate based on the dates and initials below it (see image of manually entered data for example purpose).

What is the best way to achieve this please?

Below is the link to the sheet that is in google drive which is view only to keep the original data in place but you should be able to copy it:
Dynamic Calendar

dynamic calendar image.jpg


Thank you.
Terry
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Hmmm, I did have a signature previously. I use 2010.
 
Upvote 0
Your signature shows 2007, but it's best to update your profile to show your version of Xl.
Unfortunately I'm not sure it's going to be possible to do this with your version of xl, as you don't have textjoin.
How many rows of dates/initials are you realistically likely to have?
 
Upvote 0
Your signature shows 2007, but it's best to update your profile to show your version of Xl.
Unfortunately I'm not sure it's going to be possible to do this with your version of xl, as you don't have textjoin.
How many rows of dates/initials are you realistically likely to have?
There's 140 staff that have 28 days holidays so quite a few once it's up and running.
 
Upvote 0
In that case you would be better off with a macro, is that an option?
 
Upvote 0
Ok, how about, in a standard module
VBA Code:
Function tezza(Dcl As Range, DRng As Range) As String
   Dim Cl As Range
   
   For Each Cl In DRng.Columns(1).Cells
      If Dcl.Value >= Cl.Value And Dcl.Value <= Cl.Offset(, 1).Value Then
         tezza = tezza & "," & Cl.Offset(, 3).Value
      End If
   Next Cl
   tezza = Mid(tezza, 2)
End Function
used like in B19 dragged across
Excel Formula:
=tezza(B18,$B$36:$F$37)
 
Upvote 0
Solution
Thinking about it, this is probably a better formula
Excel Formula:
=IF(MONTH(B18)<>MONTH($A18),"",tezza(B18,$B$36:$F$37))
in-case holidays cross months
 
Upvote 0
Thinking about it, this is probably a better formula
Excel Formula:
=IF(MONTH(B18)<>MONTH($A18),"",tezza(B18,$B$36:$F$37))
in-case holidays cross months
I've added the VBA and adjusted the cell ref to suit but get #NAME? errors.
name error.jpg
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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