ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   using properties in text formulas (https://www.excelbanter.com/excel-discussion-misc-queries/107585-using-properties-text-formulas.html)

[email protected]

using properties in text formulas
 
I am looking for a way to use the users name in a formula, using the
name in the Excel User Name property.

IE: I want to set up a macro that places
=Updated on " & text(now (),"MMM DD, YYYY") & " by "& {user name goes
here}
into the cell which I will then convert to a value.

I intend to do a quick check of the user name first so that if one
person does the update, it goes into one cell and anyone else's goes
into another cell.


Andy Wiggins

using properties in text formulas
 
Put this function in a module:

Function UNAME()
UNAME = Application.UserName
End Function

In a cell put:
="Updated on "&TEXT(NOW(),"MMM DD, YYYY")&" by "&UNAME()

... and you will get something like:
Updated on Aug 29, 2006 by Andy

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

wrote in message
oups.com...
I am looking for a way to use the users name in a formula, using the
name in the Excel User Name property.

IE: I want to set up a macro that places
=Updated on " & text(now (),"MMM DD, YYYY") & " by "& {user name goes
here}
into the cell which I will then convert to a value.

I intend to do a quick check of the user name first so that if one
person does the update, it goes into one cell and anyone else's goes
into another cell.




[email protected]

using properties in text formulas
 
bill.
see this

http://blogs.officezealot.com/charle...2/10/3574.aspx


wrote:
I am looking for a way to use the users name in a formula, using the
name in the Excel User Name property.

IE: I want to set up a macro that places
=Updated on " & text(now (),"MMM DD, YYYY") & " by "& {user name goes
here}
into the cell which I will then convert to a value.

I intend to do a quick check of the user name first so that if one
person does the update, it goes into one cell and anyone else's goes
into another cell.




All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com