ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding periods to sentences. (https://www.excelbanter.com/excel-discussion-misc-queries/112070-adding-periods-sentences.html)

RJJ

Adding periods to sentences.
 
How do I add periods to the ends of sentences in multiple cells at once?

Gord Dibben

Adding periods to sentences.
 
One sentence per cell and all at once?

Data in A1:A10

Select B1:B10

In B1 enter =A1 & "." then hit CTRL + ENTER

Copy/paste specialvaluesOKEsc

Delete original A1:A10.

You could also use a macro if desired.

Select the cells and run.

Sub Add_Text_Right()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo justformulas
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
Exit Sub
justformulas:
MsgBox "only formulas in range"
End Sub

When the InputBox comes upm enter a period and OK


Gord Dibben MS Excel MVP





On Thu, 28 Sep 2006 14:34:02 -0700, RJJ wrote:

How do I add periods to the ends of sentences in multiple cells at once?



Ricter

Adding periods to sentences.
 
In an empty cell, say B1, next to, for example, A1, where your sentence is,
you could enter =A1 & "."

Then you could copy the contents of B1 and Paste Special Data back into
cell A1.

To do a range of cells, simply copy the formula down the column. Delete the
formula column when you're satisfied your sentences are how you want them.
Backup your spreadsheet before doing this of course...



"RJJ" wrote:

How do I add periods to the ends of sentences in multiple cells at once?



All times are GMT +1. The time now is 05:27 PM.

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