Placing Periods in Excel

sconley1

New Member
Joined
Jan 19, 2018
Messages
6
I am trying to place a period after a middle initial and after a title. =A1&"." works however some don't have a middle initial or the name is spelled out so I do not want a period there. Any help with this would be very much appreciated!




Column A Column B Column C Column D

Mr Jo Henry Smith
Mark W Walsh
Mrs Ashley Beall
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Column A is the title (Mr)
Column B is the First Name (Jo)
Column C is the Middle Name (Henry)
Column D is the Last name (Smith)
 
Upvote 0
Welcome to the Board!

Try this:
Code:
=A1 & " " & B1 & " " & IF(LEN(C1)=1,C1 & ". ",IF(C1="","",C1 & " ")) & D1
 
Upvote 0
Thank you Joe!!! When I use your formula is puts the period where is should for middle initial, but doesn't put it after title. Example Robert Robenseifner S. Mr doesn't have the period after the Mr.

[TABLE="width: 335"]
<colgroup><col width="446" style="width: 335pt; mso-width-source: userset; mso-width-alt: 16310;"> <tbody>[TR]
[TD="width: 446, bgcolor: transparent"]Robert Robenseifner S. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Roger Kezar C. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]David Lacovone J. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Patrick Wardlaw N. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Robert Gill B. Maj[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]L Higbee T. LtCol[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Robert Jackson [/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Thank you Joe!!! When I use your formula is puts the period where is should for middle initial, but doesn't put it where it should in the title. Example Robert Robenseifner S. Mr doesn't have the period after the Mr.

[TABLE="width: 335"]
<colgroup><col width="446" style="width: 335pt; mso-width-source: userset; mso-width-alt: 16310;"><tbody>[TR]
[TD="width: 446, bgcolor: transparent"]Robert Robenseifner S. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Roger Kezar C. Mr[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
If you want to "fix" the data in place, then you can use this macro...
Code:
Sub AddPeriodOnAbbreviations()
  Dim Cell As Range
  For Each Cell In Range("A1").CurrentRegion
    If Len(Cell.Value) Then
      If Cell.Column = 1 Or Len(Cell.Value) = 1 Then Cell.Value = Cell.Value & "."
    End If
  Next
End Sub

HOW TO INSTALL MACROs
------------------------------------
If you are new to macros, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. To use the macro, go back to the worksheet with your data on it and press ALT+F8, select the macro name (AddPeriodOnAbbreviations) from the list that appears and click the Run button. The macro will execute and perform the action(s) you asked for. If you will need to do this again in this same workbook, and if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "Yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
 
Upvote 0
Try this:
Code:
=IF(A1="","",IF(A1="Miss","Miss ",A1&". "))&B1&" "&IF(LEN(C1)=1,C1&". ",IF(C1="","",C1&" "))&D1
 
Upvote 0
[TABLE="width: 212"]
<colgroup><col width="283" style="width: 212pt; mso-width-source: userset; mso-width-alt: 10349;"> <tbody>[TR]
[TD="width: 283, bgcolor: transparent"]Robert. Robenseifner S. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Robert. Robenseifner S. Mr

Gives me a period after the first name :(
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
[TABLE="class: cms_table, width: 212"]
<tbody>[TR]
[TD="width: 283, bgcolor: transparent"]Robert. Robenseifner S. Mr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Robert. Robenseifner S. Mr

Gives me a period after the first name :(
[/TD]
[/TR]
</tbody>[/TABLE]
It seems your specifications have changed.
In your first two posts, the title was in column A.
What exactly is your column structure?
 
Last edited:
Upvote 0
I am trying to place a period after a middle initial and after a title. =A1&"." works however some don't have a middle initial or the name is spelled out so I do not want a period there. Any help with this would be very much appreciated!




Column A Column B Column C Column D

Mr Jo Henry Smith
Mark W Walsh
Mrs Ashley Beall

Column A is the title (Mr)
Column B is the First Name (Jo)
Column C is the Middle Name (Henry)
Column D is the Last name (Smith)

It seems your specifications have changed.
In your first two posts, the title was in column A.
What exactly is your column structure?

Agree with Joe4, you have changed your layout, please post the correct information/question so you're not wasting people's time who are trying to help you.

This only works with your ORIGINAL information in the first 2 posts:


Book1
ABCDEFGH
1TitleFirst NameMiddle NameLast Name
2MrJoHenrySmithMr. Jo Henry Smith18
3MarkWWalshMark W. Walsh13
4MrsAshleyBeallMrs. Ashley Beall17
Sheet13
Cell Formulas
RangeFormula
F2=IF(A2="","",A2&". ")&B2&" "&IF(LEN(C2)=1,C2&". "&D2,IF(C2="",D2,C2&" "&D2))
H2=LEN(F2)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top