# is this possible with vba ?

#### Peter1973

##### Well-known Member
I have no idead how to do this even if it's possible in excel.

I have spread sheet with various info in one sheet ( stats ) has a table which is derived from other data. One of the main factors in this data is the times enterered in sheet ( mater input sheet ) cells D1:D1000 in hh:mm format.

I am trying to find a macro to run which will a change the times in the master input sheet D1:D1000 to other times ( need this to be random times in 15 min increments ie 11:00, 14:15, 21:45 etc )

Any help appreciated

I would like the sheet to then look at the table in sheet stats cells A1:h100 which will have numer both +ve and -ve and keep entering times in the master input sheet D1:D1000 untill it finds the ones that give hte best reult in the table in the sheet stats ( best result is all number or as many as possible are +ve ) but I know I am dreaming to get the sheet to do this so the first question will do me.

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### Weaver

##### Well-known Member
Not quite sure what you're going for here, but the following formula will generate random times in 15 minute increments, if that's any use

=INT(RAND()*96)/96

You should format the cell to time hh:mm to see the results

#### Peter1973

##### Well-known Member
I have thought about this and think it is a job for a mathematical genius, as what im trying to get it for the cells D1:D1000 to go through every possible combination of time in 15 min increments so i can see the reults in stats table to see which is the best combination. I know im expecting the world from my lowly pc

#### lenze

##### Legend
If you have a time in A1(Say 1:00), then
Code:
``=A1+1/24/4``
copied down will increment by 15 minute intervals. Custom format cells as either hh:mm or [hh]:mm

lenze

#### Peter1973

##### Well-known Member
Its ok as the cells i need to change constantly to utilise every possible combimation of time from 00:00 to 23:45 and give me the one which produces the best reult in the stat table ( there will be millions of combinations ) Thanks for all your help but think this is beyond excels capability

Replies
4
Views
343
Replies
13
Views
347
Replies
20
Views
509
Replies
1
Views
101
Replies
14
Views
833

1,191,191
Messages
5,985,215
Members
439,947
Latest member
fabiannic

### 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.

### Which adblocker are you using?

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

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