Excel Formula For Calculating Variable Dates

JEF13

New Member
Joined
Jun 30, 2018
Messages
49
Office Version
  1. 2019
I am looking for an Excel formula that will create dates of when a podcast show airs. Here is the situation:

  1. The podcast will publish an episode either ONCE a week on Thursday or TWICE a week on Tuesday or Thursday depending on the number of guests who do interviews
  2. Assume 52 weeks in the year for either 52 podcasts or a maximum of 104 podcasts
  3. The number of guests continually changes as new guests book interviews
Sheet 1 contains the podcast information including guest name, date podcast is published, title, etc.
Sheet 2 contains the names of the guests

I am looking for help in which an Excel Formula can populate the podcast publication dates for a calendar year. This may mean that some weeks only have one podcast episode and other weeks have two podcast episodes. Assuming there are a minimum of 52 guests we would have on episode a week on Thursday. As an example, suppose there are 85 guests lined up. The formula would ensure that every week had a minimum of one episode and some weeks had two episodes.

Any and all suggestions are welcome.

Thanks.

JEffrey
 
In your new layout, the P114 formula obviously is the same as the G2 formula in the old layout. So when I changed it to look at the list of guests, that's what it should be. Column C in the new layout doesn't seem to exist in the old layout, so I don't know what you want. In short, it appears the new adjusted formulas are working for you. Try out some scenarios and let me know.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Eric, thanks. Perhaps the unknown column was from one of the earlier iterations that was inadvertently left it.
Thanks again for your help.

Jeffrey
 
Upvote 0
Hi everyone. Something has changed with the behavior of the spreadsheet, and I'm unsure how to fix it. What's going on is that unless there information of guests go up to cell 217 the dates and guest names aren't automatically filled in. So, if the guest list goes up to 84, the system doesn't fill in all 84 guest names. Only when the guest names go up to 102 does the system fully work. There's been a slight change in the formulas as I put the spreadsheet in Google Sheets for easy team access. Any insights as to how to correct the issues is appreciated. I've pasted the relevant parts of the spread sheet below. I've pasted a partial list of the cells in the spreadsheet. Thank you in advance for your help.

Cell Formulas
RangeFormula
A2A2=IF(B2="","",IF(AND(MOD(ROW()-1,$Q$113)=0,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$199,$A$1:$A1)))<COUNTA($L$114:$L$199)),INDEX($L$114:$L$199,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$199,$A$1:$A1)))+1),INDEX($J$114:$J$199,SUMPRODUCT(SIGN(COUNTIF($J$114:$J$199,$A$1:$A1)))+1)))
A3:A17A3=IF(B3="","",IF(AND(MOD(ROW()-1,$Q$113)=0,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$217,$A$1:$A2)))<COUNTA($L$114:$L$217)),INDEX($L$114:$L$217,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$217,$A$1:$A2)))+1),INDEX($J$114:$J$217,SUMPRODUCT(SIGN(COUNTIF($J$114:$J$217,$A$1:$A2)))+1)))
B3:B17B3=IF(ROWS(B$2:B3)>COUNTA($J$114:$J$217)+MIN(COUNTA($K$127:$K$217),$M$114),"",WORKDAY.INTL(B2,1,IF(ROWS(B$2:B3)>2*(COUNTA($J$114:$J$217)+MIN(COUNTA($K$127:$K$217),$M$114)-52),"1110111","1010111")))
C3:C17C3=IF(LEN(A3)>1,C2+1,"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A112,E113,A200:A1000Cell Valuecontains "Internal"textNO


Podcast Tracker 2023.xlsx
JKLMNOPQ
113GuestsEmailInternal# of Internal Shows NeededNumber of Internal Shows Every N Weeks5
114Guest 1Internal Show 121
115Guest 2Internal Show 2
116Guest 3Internal Show 3
117Guest 4Internal Show 4Not enough internal shows - filling with guests
118Guest 5Internal Show 5
119Guest 6Internal Show 6
120Guest 7Internal Show 7
121Guest 8Internal Show 8
122Guest 9Internal Show 9
123Guest 10Internal Show 10
124Guest 11Internal Show 11
125Guest 12Internal Show 12
126Guest 13Internal Show 13
127Guest 14Internal Show 14
128Guest 15Internal Show 15
129Guest 16Internal Show 16
130Guest 17Internal Show 17
131Guest 18Internal Show 18
132Guest 19Internal Show 19
133Guest 20Internal Show 20
134Guest 21Internal Show 21
135Guest 22
136Guest 23
137Guest 24
138Guest 25
139Guest 26
140Guest 27
141Guest 28
142Guest 29
143Guest 30
144Guest 31
145Guest 32
146Guest 33
147Guest 34
148Guest 35
149Guest 36
150Guest 37
151Guest 38
152Guest 39
Master Spreadsheet For Podcast
Cell Formulas
RangeFormula
M114M114=INT((COUNTA(J114:K199)-1)/(Q113-1))
M117M117=IF(COUNTA(J114:K199)>104,"Too many shows scheduled for 1 year",IF(COUNTA(K127:K199)<M114,"Not enough internal shows - filling with guests",""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M113Expression=$K113="Y"textNO
J117:J127,J130:J139,J143:J152,J156:J165,J169:J172,J176:J186,J189:J224,J228:J231,J235:J245,J248:J257,J261:J270,J274:J283,J287:J290,J294:J304,J307:J316,J320:J329,J333:J342,J346:J349,J353:J363,J366:J373Cell Valuecontains "JeffreyEpisode"textNO
L116Cell Valuecontains "JeffreyEpisode"textNO
L115,L117,L119,L121,L123,L125,K127,K129,K131,K133,K135,K137,K139,K141,K143,K145Cell Valuecontains "JeffreyEpisode"textNO
J135:J139,J194:J215,J253:J257,J312:J316,J371:J373Cell Valuecontains "JeffreyEpisode"textNO
J147:J152,J206:J211,J265:J270,J324:J329Cell Valuecontains "JeffreyEpisode"textNO
J143:J148,J202:J215,J261:J266,J320:J325Cell Valuecontains "JeffreyEpisode"textNO
J140:J144,J199:J203,J258:J262,J317:J321Cell Valuecontains "JeffreyEpisode"textNO
 
Upvote 0
It looks like the formulas are working ok, BUT, it looks like you altered the range references somehow when you rearranged your sheet. In particular, the reference to column L114:L217 was messed up in most of the formulas. See below:

Cell Formulas
RangeFormula
A2A2=IF(B2="","",IF(AND(MOD(ROW()-1,$Q$113)=0,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$199,$A$1:$A1)))<COUNTA($L$114:$L$199)),INDEX($L$114:$L$199,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$199,$A$1:$A1)))+1),INDEX($J$114:$J$199,SUMPRODUCT(SIGN(COUNTIF($J$114:$J$199,$A$1:$A1)))+1)))
A3:A51A3=IF(B3="","",IF(AND(MOD(ROW()-1,$Q$113)=0,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$217,$A$1:$A2)))<COUNTA($L$114:$L$217)),INDEX($L$114:$L$217,SUMPRODUCT(SIGN(COUNTIF($L$114:$L$217,$A$1:$A2)))+1),INDEX($J$114:$J$217,SUMPRODUCT(SIGN(COUNTIF($J$114:$J$217,$A$1:$A2)))+1)))
B3:B51B3=IF(ROWS(B$2:B3)>COUNTA($J$114:$J$217)+MIN(COUNTA($L$114:$L$217),$M$114),"",WORKDAY.INTL(B2,1,IF(ROWS(B$2:B3)>2*(COUNTA($J$114:$J$217)+MIN(COUNTA($L$114:$L$217),$M$114)-52),"1110111","1010111")))
C3:C51C3=IF(LEN(A3)>1,C2+1,"")


Book1
JKLMNOPQ
113GuestsEmailInternal# of Internal Shows NeededNumber of Internal Shows Every N Weeks5
114Guest 1Internal Show 19
115Guest 2Internal Show 2
116Guest 3Internal Show 3
117Guest 4Internal Show 4 
118Guest 5Internal Show 5
119Guest 6Internal Show 6
120Guest 7Internal Show 7
121Guest 8Internal Show 8
122Guest 9Internal Show 9
123Guest 10Internal Show 10
124Guest 11Internal Show 11
125Guest 12Internal Show 12
126Guest 13Internal Show 13
127Guest 14Internal Show 14
128Guest 15Internal Show 15
129Guest 16Internal Show 16
130Guest 17Internal Show 17
131Guest 18Internal Show 18
132Guest 19Internal Show 19
133Guest 20Internal Show 20
134Guest 21Internal Show 21
135Guest 22
136Guest 23
137Guest 24
138Guest 25
139Guest 26
140Guest 27
141Guest 28
142Guest 29
143Guest 30
144Guest 31
145Guest 32
146Guest 33
147Guest 34
148Guest 35
149Guest 36
150Guest 37
151Guest 38
152Guest 39
153
Sheet3
Cell Formulas
RangeFormula
M114M114=INT((COUNTA(J114:K199)-1)/(Q113-1))
M117M117=IF(COUNTA(J114:J199)>104,"Too many shows scheduled for 1 year",IF(COUNTA(L114:L199)<M114,"Not enough internal shows - filling with guests",""))


I can't help much with Google Sheets. Most of the time the formulas can be transferred directly, but not always. If it doesn't work there, I don't have a way to test. Good luck!
 
Upvote 0
Eric, as always, thanks for your help. Everything is once again working!
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,681
Members
449,048
Latest member
81jamesacct

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