Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User name and greeting


I have the following formula, which calls a function in order to get the
windows user name, and then offers them a greeting. What I'm trying to
do is take the user name and turn it into thier real name. I only have
about 5 people that use this workbook. So I'd like jdoe1 to be John Doe
1, and jdoe2 to be John Doe 2, etc. I can't seem to get it to work for
multiple persons.

=IF(NOW()-INT(NOW())<0.5,"Good Morning"&" "&GetName(2)&"Today is"&"
"&TEXT(TODAY(),"mmmm dd, yyyy"),IF(NOW()-INT(NOW())<0.75,"Good
Afternoon"&" "&GetName(2)&"Today is"&" "&TEXT(TODAY(),"mmmm dd,
yyyy"),"Good Evening"&" "&GetName(2)&"Today is"&" "&TEXT(TODAY(),"mmmm
dd, yyyy")))

Thanks in advance.

ep


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=555196

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default User name and greeting

You don't show GetName, but I assume it is a simple function to return the
user name, and with such a function it worked fine for me.

I simplified it though like so

="Good
"&LOOKUP(MOD(NOW(),1),{0,0.5,0.75},{"Morning","Afe ternoon","Evening"})&GetNa
me(2)&"Today is"&" "&TEXT(TODAY(),"mmmm dd, yyyy")

The other thing to note is that it will not update as the time changes,
unless some othe calc happens.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"edwardpestian"
wrote in message
news:edwardpestian.29wgbb_1151140802.4986@excelfor um-nospam.com...

I have the following formula, which calls a function in order to get the
windows user name, and then offers them a greeting. What I'm trying to
do is take the user name and turn it into thier real name. I only have
about 5 people that use this workbook. So I'd like jdoe1 to be John Doe
1, and jdoe2 to be John Doe 2, etc. I can't seem to get it to work for
multiple persons.

=IF(NOW()-INT(NOW())<0.5,"Good Morning"&" "&GetName(2)&"Today is"&"
"&TEXT(TODAY(),"mmmm dd, yyyy"),IF(NOW()-INT(NOW())<0.75,"Good
Afternoon"&" "&GetName(2)&"Today is"&" "&TEXT(TODAY(),"mmmm dd,
yyyy"),"Good Evening"&" "&GetName(2)&"Today is"&" "&TEXT(TODAY(),"mmmm
dd, yyyy")))

Thanks in advance.

ep


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile:

http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=555196



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User name and greeting


How do I convert their username to their real name. Let's say that
put each user's real name in a cell range: A1:A3. If the username i
jdoe1 then return A1, if the username is jdoe2, then return A2, etc.

A1 = John Doe 1
A2 = John Doe 2
A3 = John Doe 3

Thanks.

e

--
edwardpestia
-----------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...fo&userid=3380
View this thread: http://www.excelforum.com/showthread.php?threadid=55519

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User name and greeting


="Good"&
"&LOOKUP(MOD(NOW(),1),{0,0.5,0.75},{"Morning","Aft ernoon","Evening"})&
"&IF(GetName(2)="jdoe1","John Doe 1"&" "&"Today is"&
"&TEXT(TODAY(),"mmmm dd, yyyy"),IF(GetName(2)="jdoe2","John Doe 2"&
"&"Today is"&" "&TEXT(TODAY(),"mmmm dd
yyyy"),IF(GetName(2)="jdoe3","John Doe 3"&" "&"Today is"&
"&TEXT(TODAY(),"mmmm dd, yyyy"),"Today is"&" "&TEXT(TODAY(),"mmmm dd
yyyy"))))

Is there a better way so that I could add more that 7 users and not b
limited to 7 nested IF statements.

Thanks.

e

--
edwardpestia
-----------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...fo&userid=3380
View this thread: http://www.excelforum.com/showthread.php?threadid=55519

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default User name and greeting

Create a lookup table like so

A1 = jdoe1 B1 = John Doe 1
etc., and then use

="Good"&
LOOKUP(MOD(NOW(),1),{0,0.5,0.75},{"Morning","Afete rnoon","Evening"})&
VLOOKUP(GetName(2),A1:B10.2,False)&
"Today is"&" "&TEXT(TODAY(),"mmmm dd, yyyy")


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"edwardpestian"
wrote in message
news:edwardpestian.29wnhn_1151150102.687@excelforu m-nospam.com...

How do I convert their username to their real name. Let's say that I
put each user's real name in a cell range: A1:A3. If the username is
jdoe1 then return A1, if the username is jdoe2, then return A2, etc.

A1 = John Doe 1
A2 = John Doe 2
A3 = John Doe 3

Thanks.

ep


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile:

http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=555196





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User name and greeting


Worked Great. Thanks Bob!


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=555196

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pick a cell to go to a sheet in the workbook (greeting page) tom n. Excel Discussion (Misc queries) 4 October 4th 08 03:33 PM
greeting Molly Excel Discussion (Misc queries) 4 April 12th 07 03:50 PM
Greeting Function edwardpestian Excel Worksheet Functions 7 June 23rd 06 08:29 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
How to: Make user click End User License Agreement acceptance jasonsweeney[_21_] Excel Programming 7 January 30th 04 01:41 AM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"