# Off Topic > The Water Cooler >  >  Fibonacci Clock in Excel with a multitude of options

## Mark Millett

Hi, I've created a Fibonacci Clock showing hours, minutes and seconds in a spectrum of colours, and a multitude of options .  Grateful for any feedback.  Mark

----------


## bsalv

add in thisworkbook


```
Please Login or Register  to view this content.
```


delete 1st line in module1 "private sub work..."

----------


## Mark Millett

> add in thisworkbook
> 
> 
> ```
> Please Login or Register  to view this content.
> ```
> 
> 
> delete 1st line in module1 "private sub work..."



Bsalv, thank you, I'll give it a try. Mark

----------


## snb

Instead of 

=IF(MOD(A2+A6;3)=2;1;0)




```

=N(MOD(A2+A6;3)=2) 


```


or



```

=MOD(A2+A6;3)=2 


```

----------


## Mark Millett

> Instead of 
> 
> =IF(MOD(A2+A6;3)=2;1;0)
> 
> 
> 
> 
> ```
> 
> ...



Snb, thank you, I'll look into this. I'm very proud of my MOD formula, so let's see  :Smilie:  Mark

----------


## TMS

> I'm very proud of my MOD formula, so let's see



You were looking for advice. The first formula does exactly the same as yours and produces a 0 or 1, without the IF. The second produces True or False, which I guess is how you might be interpreting the 0/1 result.

----------


## snb

I'd prefer a few VBA-lines.

----------


## Mark Millett

Bsalv, I did give it a try, but it didn't seem to make any difference, but I'm probably doing it wrong.  I'm assuming it was meant to start the clock automatically.  This is how I entered the code:





> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> 
>      Disable                                                    'stop the "ontime"
> 
>      ThisWorkbook.Saved = True                                  'don't ask to save while closing
> 
> End Sub



Just before the existing code.  I deleted the line "Private sub work..."

Mark

----------


## Mark Millett

TMS and snb, I did try the different formula, but it didn't work for me.  I used the IF(MOD) function to reduce output to 0 or 1 so I can't see how using a different formula would improve the outcome, but thank you for suggesting and I'm always willing to learn new things, for a bear of small brains that is. Mark

----------


## Mark Millett

snb, I'm not having much luck tonight.  I wasn't able to run your clock from my rather dated machine.  I do admire the code, but I think there is a reason why I'm confined to Excel formulas  :Smilie:  =IF(AB>0,"Give it a try","Admit defeat").  Mark

----------


## bsalv

see attachment.

In ThisWorkbook
while closing, there is no irritating question about saving, so be sure, you did it yourself if you made modifications.
When you open the file, the clock start also

In Module1
the 1st line is now comment (because the ' in front) and can be deleted.
2 macros are now joined in one, functionality is the same.

Be aware that some terms are dangerous when they also have a meaning in VBA.
"Disable" isn't, but is close. Later, finding such an error is difficult, so rename your macro "Disable_Clock" or something similar.

----------


## Mark Millett

bsalv, thank you, that worked. I would like to give you credit in the 'Journey' tab as I have with the other sources I found along the way.  What would be the best way for me to do this for your contribution?  Mark

----------


## bsalv

I'm more a helper then an asker, so i never did, but i think here "Add a reputation" in *one of my posts*

----------


## snb

The clock I posted doesn't 'run'
Only if you change the time value in L2 the clock will be changed.
The VBA is Excel version independent.
And as soon as you use VBA you'd better do the whole thing in VBA.
And: avoid merged cells.

----------


## Mark Millett

snb, thank you, I take your point about VBA and also about merged cells (also my pet hate), but as you may have guessed, I'm not a coder and just copied the code to automate the clock.  I'll repost the updated version 1.1 once I've made a few other changes so others can enjoy what has turned into a collaborative project.  Mark

I've now attached the amended Fibonacci Clock, with changes to the code provided by bsalv and with a few amendments I've made to the layout.  Thank you all for your help and roll on the next project  :Smilie:  Mark

Just some minor corrections  :Smilie:  Mark

----------


## Mark Millett

Just some minor corrections

----------

