A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Function NOW



 
 
Thread Tools Display Modes
  #1  
Old June 15th, 2009, 01:25 PM posted to microsoft.public.excel.worksheet.functions
peterW
external usenet poster
 
Posts: 22
Default Function NOW

I would like to have the function “NOW” on more then one place in a worksheet
and be able to choose when each cell is calculated
  #2  
Old June 15th, 2009, 02:11 PM posted to microsoft.public.excel.worksheet.functions
Gary''s Student
external usenet poster
 
Posts: 7,584
Default Function NOW

1. first enter this tiny User Defined Function:

Function nnow() As Date
nnow = Now
End Function

2. Then In A1 enter 0

3. then, in another cell, say B9, enter:

=nnow()+a1 and format this cell as Custom mm/dd/yyyy hh:mm:ss

B9 will now display like NOW(), but only update when you change the value in
A1.


--
Gary''s Student - gsnu200856
  #3  
Old June 15th, 2009, 02:37 PM posted to microsoft.public.excel.worksheet.functions
peterW
external usenet poster
 
Posts: 22
Default Function NOW

Thanks for the answer
Where can I define my own functions?

//Peter

"Gary''s Student" wrote:

1. first enter this tiny User Defined Function:

Function nnow() As Date
nnow = Now
End Function

2. Then In A1 enter 0

3. then, in another cell, say B9, enter:

=nnow()+a1 and format this cell as Custom mm/dd/yyyy hh:mm:ss

B9 will now display like NOW(), but only update when you change the value in
A1.


--
Gary''s Student - gsnu200856

  #4  
Old June 15th, 2009, 02:45 PM posted to microsoft.public.excel.worksheet.functions
Gary''s Student
external usenet poster
 
Posts: 7,584
Default Function NOW


UDFs are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To use the UDF from the normal Excel window, just enter it like a normal
Excel Function

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about UDFs, see:

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx

--
Gary''s Student - gsnu200856


"PeterW" wrote:

Thanks for the answer
Where can I define my own functions?

//Peter

"Gary''s Student" wrote:

1. first enter this tiny User Defined Function:

Function nnow() As Date
nnow = Now
End Function

2. Then In A1 enter 0

3. then, in another cell, say B9, enter:

=nnow()+a1 and format this cell as Custom mm/dd/yyyy hh:mm:ss

B9 will now display like NOW(), but only update when you change the value in
A1.


--
Gary''s Student - gsnu200856

  #5  
Old June 15th, 2009, 02:54 PM posted to microsoft.public.excel.worksheet.functions
peterW
external usenet poster
 
Posts: 22
Default Function NOW

It works perfect, thank you

//Peter

"Gary''s Student" wrote:


UDFs are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To use the UDF from the normal Excel window, just enter it like a normal
Excel Function

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about UDFs, see:

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx

--
Gary''s Student - gsnu200856


"PeterW" wrote:

Thanks for the answer
Where can I define my own functions?

//Peter

"Gary''s Student" wrote:

1. first enter this tiny User Defined Function:

Function nnow() As Date
nnow = Now
End Function

2. Then In A1 enter 0

3. then, in another cell, say B9, enter:

=nnow()+a1 and format this cell as Custom mm/dd/yyyy hh:mm:ss

B9 will now display like NOW(), but only update when you change the value in
A1.


--
Gary''s Student - gsnu200856

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:15 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.