I like it.As long as he's OK with the limitations.The first entry will be within the first hour.Subsequent entries will be between 31 minutes and 55 minutes away. The only problem with this is that it doesn't produce a very even "random" distribution.The only way any time values will be in the 20:00 to 21:00 range will be if a significant number of the first 15 values were near the 55 minute range rather than the 31 minute range. I wrote a macro to do 100,000 iterations of the data set.Out of 100,000 calculations, there were only 35 sets in which an entry was between 20:00 and 21:00 Paul----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- From: Vaibhav Joshi <v...@vabs.in> To: "excel-macros@googlegroups.com" <excel-macros@googlegroups.com> Sent: Monday, November 30, 2015 9:16 AM Subject: Re: $$Excel-Macros$$ Random Time Problem put this formula in I2 & drag down: =IF(COUNTIF($B$2:B2,B2)=1,RANDBETWEEN(420,480)/1440,RANDBETWEEN(I1*1440+TIME(0,31,0)*1440,I1*1440+TIME(0,55,0)*1440)/1440) Cheers!!
On Wed, Nov 25, 2015 at 1:44 AM, Bill Q <ronsmith...@gmail.com> wrote: I gave this my best shot - but I am not satisfied with it. PSA. * What I have are dates between November 15, 2015 to January 16, 2016 * Each date will have 16 radio "spots".* These spots are to be anywhere between 07:00 to 21:00. I was able to randomize the time somewhat with the final product in row "H". However, I see instances where the times between spots are too close for my liking. What I need is some sort of random formula that will return a time between 07:00 to 21:00 BUT will never be within 30 minutes of each other. Anyone ? Thank you.-- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.