Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2022, 04:39 AM
cazclocker cazclocker is offline How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 7 64bit How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2010 64bit
Novice
How can I add a "close quote" mark AFTER each entry to a LONG column of numbers?
 
Join Date: Jan 2015
Posts: 5
cazclocker is on a distinguished road
Default How can I add a "close quote" mark AFTER each entry to a LONG column of numbers?

I'm working with a very long (380 or so) column of numbers. Each entry in the column is in this format: 0.0215


The entire vertical column is formatted "Number - 4 decimal places".



I want to add the quote mark after each entry WITHOUT CHANGING ANY OF THE NUMERICAL ENTRIES, so that the above entry will appear like this: 0.0215"


The numbers in the column I want to modify are meant to designate fractions of an inch, so that's why I want to add the quote mark.


How can I do that?
Reply With Quote
  #2  
Old 07-08-2022, 08:54 AM
rollis13's Avatar
rollis13 rollis13 is online now How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 140
rollis13 will become famous soon enough
Default

Use Custom Format:
HTML Code:
0.0000\"
Reply With Quote
  #3  
Old 07-08-2022, 08:55 AM
Logit Logit is offline How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

The following will add the inches symbol but if the last digit is ZERO, it is dropped from the number even though the column is formatted to FOUR DIGITS after the decimal.


Code:
Sub InsertQuotes()
    Dim arr() As Variant, i As Long
    arr = Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
    For i = LBound(arr) To UBound(arr)
        arr(i, 1) = arr(i, 1) & """"
    Next i
    Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row).Value = arr
End Sub
Reply With Quote
  #4  
Old 07-12-2022, 12:58 PM
kilroyscarnival kilroyscarnival is offline How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2019
Expert
 
Join Date: May 2019
Posts: 344
kilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nice
Default

Quote:
Originally Posted by cazclocker View Post
I'm working with a very long (380 or so) column of numbers. Each entry in the column is in this format: 0.0215
The entire vertical column is formatted "Number - 4 decimal places".



I want to add the quote mark after each entry WITHOUT CHANGING ANY OF THE NUMERICAL ENTRIES, so that the above entry will appear like this: 0.0215"


The numbers in the column I want to modify are meant to designate fractions of an inch, so that's why I want to add the quote mark.


How can I do that?
You can use the code the others suggested. I just use the cell formatting.

Highlight your cells or your entire column. On the Home ribbon, find the section for Number formatting. I tend to first format as a Number, change to four decimal places, and then go to Custom. In the Custom pane, you can type the character you want to show behind your number. The wrinkle is the quotation mark itself is not going to work, because Excel thinks you're using a formula. So I type behind the number " (open quotation mark) then ' (apostrophe) then another ' (apostrophe), then " (close quotation mark.) The quotes frame what you want to put there, and the two sequential apostrophes appear as if a quotation mark. So, in your Custom line, it's 0.000"''". Quote-apostrophe-apostrophe-quote.
Attached Images
File Type: jpg inches.jpg (144.5 KB, 19 views)
Reply With Quote
  #5  
Old 07-13-2022, 08:16 AM
Steve Kunkel Steve Kunkel is offline How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2019
Advanced Beginner
 
Join Date: May 2019
Location: Seattle area
Posts: 77
Steve Kunkel is on a distinguished road
Default

Depending what you want to do with the values, you could also have an additional column next to your existing one, that has, for example
Code:
=A1&"""
The cells with the double quote mark would no longer be "numbers" though, so you wouln't be able to do math with them (average, etc).
Reply With Quote
  #6  
Old 07-13-2022, 08:58 AM
rollis13's Avatar
rollis13 rollis13 is online now How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 140
rollis13 will become famous soon enough
Default

Quote:
Originally Posted by Steve Kunkel View Post
The cells with the double quote mark would no longer be "numbers" though
Have you tried my suggestion in post #2 ?
Reply With Quote
  #7  
Old 07-14-2022, 07:14 AM
Steve Kunkel Steve Kunkel is offline How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2019
Advanced Beginner
 
Join Date: May 2019
Location: Seattle area
Posts: 77
Steve Kunkel is on a distinguished road
Default

Quote:
Originally Posted by rollis13 View Post
Have you tried my suggestion in post #2 ?
Yeah. Given OP's desire to leave the numerical values unchanged, just changing the formatting (as you have done), is probably what he needs. For other purposes though, changing the value could be useful. For example if he wanted a textual summary statement such as
Code:
="The measurement is: "&B1
then actually changing the value would be useful.

Though, as I write this, is accurs to me that
Code:
="The measurement is: "&TEXT(B1,"0.000\""")
would also work.
Reply With Quote
  #8  
Old 07-14-2022, 07:37 AM
rollis13's Avatar
rollis13 rollis13 is online now How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Windows 10 How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 140
rollis13 will become famous soon enough
Default

So my case I would have used:
Code:
="The measurement is: "&B1&""""
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split apart "page break" and "paragraph mark" EwenMc Word 4 10-03-2021 02:12 AM
How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? One page in a document has a "full" or "long" Footnote Separator. It's only this one page, I'm lost. taddpoal Word 5 05-10-2020 04:07 PM
"Magic" indentation for "too-long" text-lines that are longer than one line pGrnd Word 2 04-20-2020 03:23 PM
How can I add a "close quote" mark AFTER each entry to a LONG column of numbers? Formula to format "I" column based on if "F" column row is not blank ravl13 Excel 3 08-22-2017 12:26 PM
Need help with conditional formatting & returning "Pass" / "Fail Results" in a Column N mikey386 Excel 2 12-11-2014 01:14 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft