I have a shared spreadsheet that uses a column with a validation list. I want to be able to take the MS Office Username contained in Tools > Options to be put into a cell A1 when changing the value of A2.
Is it possible?
I have a shared spreadsheet that uses a column with a validation list. I want to be able to take the MS Office Username contained in Tools > Options to be put into a cell A1 when changing the value of A2.
Is it possible?
Right-click on the sheet tab, select view code, and copy and paste the following:
This will enter the MS Excel user name in cell A1 whenever cell B1 is anything except blank. Is this what you were looking for?![]()
Please Login or Register to view this content.
Will this work for the range of a column or is it cell specific? Other than that, it's exactly what I was inquiring about. Thanks!
For a range of cells, you would need a little extra code:
You can change the red range above to suit your needs.![]()
Please Login or Register to view this content.
Thanks again. I tried the code and it works, but puts the value in a singular specific field. I don't think I'm explaining myself correctly.
For every cell in the range (let's say A3:A1501) that changes to Y, I need the corresponding cell in B3:B1501 to change to the username.
thanks again
After playing around with code for a while and wondering why I couldn't get it to work, I realized I was using the SelectionChange event, rather than the Change event. OOPS! This code should work for you hopefully:
![]()
Please Login or Register to view this content.
Last edited by jasoncw; 01-25-2007 at 06:54 PM.
That works great! Thanks again. I did run into an unexpected scenario though and was wondering if the code could be moded easily to accomodate the encounter.
If you clear a cell that is currently not null, can the username then be removed from the target cell?
You rock man! thanks again.
Are you saying that if the cell is cleared (deleted), then you don't want the user name to appear? If that is what you are asking:
![]()
Please Login or Register to view this content.
That did the trick. You've just made my job about 1000% more efficient.
Kudos to you
LOL! Glad I could help!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks