![]() |
Cell Formatting
I'd like to format a cell (C15 for example), so that whenever I enter a name
(e.g. "John Smith"), it is automatically converted to "Mr. John Smith". How can I do that in Excel? |
Cell Formatting
You can do that with this event sub, but what about women?
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "C15" Then Application.EnableEvents = False Target.Value = "Mr. " & Target.Value Application.EnableEvents = True End If End Sub Regards, Stefi €˛Hi_no_Tori€¯ ezt Ć*rta: I'd like to format a cell (C15 for example), so that whenever I enter a name (e.g. "John Smith"), it is automatically converted to "Mr. John Smith". How can I do that in Excel? |
Cell Formatting
Thanks a lot Stefi. I tried the code and its working. As for women. There
are no women, so the code should be o.k. Thanks again Stefi. (^_^) "Stefi" wrote: You can do that with this event sub, but what about women? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "C15" Then Application.EnableEvents = False Target.Value = "Mr. " & Target.Value Application.EnableEvents = True End If End Sub Regards, Stefi €˛Hi_no_Tori€¯ ezt Ć*rta: I'd like to format a cell (C15 for example), so that whenever I enter a name (e.g. "John Smith"), it is automatically converted to "Mr. John Smith". How can I do that in Excel? |
Cell Formatting
You are welcome! Thanks for the feedback!
Stefi €˛Hi_no_Tori€¯ ezt Ć*rta: Thanks a lot Stefi. I tried the code and its working. As for women. There are no women, so the code should be o.k. Thanks again Stefi. (^_^) "Stefi" wrote: You can do that with this event sub, but what about women? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "C15" Then Application.EnableEvents = False Target.Value = "Mr. " & Target.Value Application.EnableEvents = True End If End Sub Regards, Stefi €˛Hi_no_Tori€¯ ezt Ć*rta: I'd like to format a cell (C15 for example), so that whenever I enter a name (e.g. "John Smith"), it is automatically converted to "Mr. John Smith". How can I do that in Excel? |
All times are GMT +1. The time now is 08:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com