Sequential Times within range?

Painzstake

New Member
Joined
Mar 25, 2014
Messages
10
I'm customising a social media bot that autoposts from my notetaking program. What I am trying to figure out is seqential timestamping within a defined range. I've been able to get parts working with IF statements, but I'm struggling to get the 'queue' portion to work. Here's what I'm looking to do;


  • If the # column (A) is a decimal, then it's to be scheduled now. Preceeding posts rise in increments defined by F2.
  • If the # column (A) is a whole number, it joins the queue (B). The queue is a series of seqential times defined by F1, F3, and F4. Schedule interval is when posts are to be made, start and end define the seqenece's daily extents. When the sequence exceeds the end time or result in an even value, it starts a new day at the beginning of the start time.
  • As I'm adapting someone else's sheet, the result of F6 is a scripted text. I used the following to pull the various time values, though I imagine there may be an easier way. TIME(IF(ISNUMBER(SEARCH("Hour",Settings!$F$1)),LEFT(Settings!$F$1,FIND("",Settings!$F$1)-1)),IF(ISNUMBER(SEARCH("Minute",Settings!$F$1)),LEFT(Settings!$F$1,FIND(" ",Settings!$F$1)-1),0),0).
  • The formula needs to work as an array.

I hope that's clear, I'd appreciate your help if you're able to solve this!

Example:
A
B
CD
E
1
#Queue (E.g.)Schedule Interval:6 hours
20.1NOW()Minimum Spacing:00:15:00
3
0.2NOW()+00:15Start at:10:00
4
0.3
NOW()+00:30End at:22:00
5
0.4
NOW()+00:45
6
111/03/18 10:00
7
211/03/18 16:00
8
311/03/18 22:00
9412/03/18 10:00
10512/03/18 16:00
11612/03/18 22:00
12713/03/18 10:00

<tbody>
</tbody>
 
Last edited:
Yes, it explains a lot. Google sheets uses Java script, not VBA. You need a JS custom function; unfortunately, I cannot write it.
I suggest you post a question on a forum with a JS section, such as Stack Overflow.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
After several hours tinkering with this problem I was able to come up with a solution. In case <g class="gr_ gr_207 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="207" data-gr-id="207">anyody</g> happens to <g class="gr_ gr_208 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="208" data-gr-id="208">stumlbe</g> across this post in the future;

I changed the import location of the old E1 to another cell. The 'new' E1, references that cell using <bdo dir="ltr">| =TIME(IF(ISNUMBER(SEARCH("hour",B3)),LEFT(B3,2),0),IF(ISNUMBER(SEARCH("minute",B3)),LEFT(B3,2),0),0).</bdo>

Column B's formula | =ARRAYFORMULA(IF(ISBLANK(B2:B),"",IF(B2:B<1,CEILING(NOW(),$E$2)+((B2:B*10-1)*$E$2),IF($E$5>=B2:B,TODAY(),TODAY()+(FLOOR(B2:B-1,$E$5)/$E$5))+$E$3+IF(A2:A>$E$5,MOD(A2:A,$E$5+1),A2:A)*$E$3)))

E5 is a new addition that helps further simplify the formula | <bdo dir="ltr">=ROUNDDOWN((B14-B13)/C3,0)

Big thanks to Worf and TBH777 for giving this problem a shot. I appreciate the time you took to get come up with solutions.</bdo>

Example:
ABCDE
1#Queue (E.g.)Schedule Interval:
06:00:00
20.1NOW()Minimum Spacing:00:15:00
30.2NOW()+00:15Start at:10:00
40.3NOW()+00:30End at:22:00
50.4NOW()+00:45Per day:
3.00
6111/03/18 10:00
7211/03/18 16:00
8311/03/18 22:00
9412/03/18 10:00
10512/03/18 16:00
11612/03/18 22:00
12713/03/18 10:00

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,479
Messages
6,125,041
Members
449,206
Latest member
Healthydogs

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