Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear all,
just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
VBA Can do it.
This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In namebox type A1:A84 and hit Enter key.
Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Could be I missed the point of OP's question<g
Gord On Wed, 10 Oct 2007 17:30:02 -0700, Mike wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
hi gord,
I was assuming he had data in the cell and wanted to right justify it all. but i have never figured out how to do that yet. Regards FSt1 "Gord Dibben" wrote: Could be I missed the point of OP's question<g Gord On Wed, 10 Oct 2007 17:30:02 -0700, Mike wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You can't add double quotes to right-justify. If you have Transition options
enabled it will be automatic. Gord On Wed, 10 Oct 2007 18:35:00 -0700, FSt1 wrote: hi gord, I was assuming he had data in the cell and wanted to right justify it all. but i have never figured out how to do that yet. Regards FSt1 "Gord Dibben" wrote: Could be I missed the point of OP's question<g Gord On Wed, 10 Oct 2007 17:30:02 -0700, Mike wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
hi
you're right. but put 777 in a cell then add a double quote to it. it right justifies and becomes text. his whole post confused me. I re-read it several times. and he seems to be asking for a single double quote. the symbols ', ^ and " are use by xl (and lotus) to signify wheather text is to be left justified , centered or right justified. but if you put a single double quote in a cell with no text data, the double quote doesn't show.(nor do the other symbols) if you do have text data, it right justifies. provide you don't wipe out the data adding it. and if all you wanted to do is right justify then why not just high light the date and click the right justify icon. your way worked too. you don't know how close i come to asking the same question you did. why? Regards FSt1 "Gord Dibben" wrote: You can't add double quotes to right-justify. If you have Transition options enabled it will be automatic. Gord On Wed, 10 Oct 2007 18:35:00 -0700, FSt1 wrote: hi gord, I was assuming he had data in the cell and wanted to right justify it all. but i have never figured out how to do that yet. Regards FSt1 "Gord Dibben" wrote: Could be I missed the point of OP's question<g Gord On Wed, 10 Oct 2007 17:30:02 -0700, Mike wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
hi
better example. put 777 in a cell and but a single quote before it. it now left justifes. numbers right justify by default. FSt1 "FSt1" wrote: hi you're right. but put 777 in a cell then add a double quote to it. it right justifies and becomes text. his whole post confused me. I re-read it several times. and he seems to be asking for a single double quote. the symbols ', ^ and " are use by xl (and lotus) to signify wheather text is to be left justified , centered or right justified. but if you put a single double quote in a cell with no text data, the double quote doesn't show.(nor do the other symbols) if you do have text data, it right justifies. provide you don't wipe out the data adding it. and if all you wanted to do is right justify then why not just high light the date and click the right justify icon. your way worked too. you don't know how close i come to asking the same question you did. why? Regards FSt1 "Gord Dibben" wrote: You can't add double quotes to right-justify. If you have Transition options enabled it will be automatic. Gord On Wed, 10 Oct 2007 18:35:00 -0700, FSt1 wrote: hi gord, I was assuming he had data in the cell and wanted to right justify it all. but i have never figured out how to do that yet. Regards FSt1 "Gord Dibben" wrote: Could be I missed the point of OP's question<g Gord On Wed, 10 Oct 2007 17:30:02 -0700, Mike wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Gord,
Sorry for my ignorance, when I type in A1:A84 and hit enter key, it becomes A1 itself.. and when you say type " in active cell, which active cell do you mean? thanks vey much! I am just trying to do that so I can convert the excel table into a text file, and then I can use the text file as an input for a macro. and this column is all the time value(such as 9:00AM, etc) I know it is a strange process, but that is my school assignment..couldn' think of a better way to do that .. "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Gord, I just figure out what you mean now, I should type" both at the end and the beginning, how stupid I am. it is working now... so thanks all ! "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
the strange thing about this way is that all the value is reset to the active
cell one... do I do sth wrong about that? "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The namebox is the box at left end of the formula bar.
It shows which cell is selected. Select A1 and then click in the namebox and type in A1:A84 and hit Enter key. A1:A84 will be highlighted with A1 as the active cell. But you don't want to enter quote marks if you already have the time values in the cells. Just save the file as a CSV(comma de-limited) (*.csv) or Text(Tab delimited) (*.txt) file and use that as your input file. Gord On Wed, 10 Oct 2007 20:58:09 -0700, crazyfisher wrote: Thanks Gord, Sorry for my ignorance, when I type in A1:A84 and hit enter key, it becomes A1 itself.. and when you say type " in active cell, which active cell do you mean? thanks vey much! I am just trying to do that so I can convert the excel table into a text file, and then I can use the text file as an input for a macro. and this column is all the time value(such as 9:00AM, etc) I know it is a strange process, but that is my school assignment..couldn' think of a better way to do that .. "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#13
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes.
The original data will not be retained using that method. See next post about saving as a *.txt file without adding any quote marks in cells. Gord On Wed, 10 Oct 2007 21:06:02 -0700, crazyfisher wrote: the strange thing about this way is that all the value is reset to the active cell one... do I do sth wrong about that? "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#14
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, that is not what i want to see....
I was using the code by Mike, and it is working fine for general cells, but what if it is cells with formats? such as time value? such as 9 am,. if I use the code, it will change 9am to "0.375", I understand I should change the code to accomdate this , but I am not sure how. : "Gord Dibben" wrote: Yes. The original data will not be retained using that method. See next post about saving as a *.txt file without adding any quote marks in cells. Gord On Wed, 10 Oct 2007 21:06:02 -0700, crazyfisher wrote: the strange thing about this way is that all the value is reset to the active cell one... do I do sth wrong about that? "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#15
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Another method to change the time values to text.
In B1 enter =TEXT(A1,"h:mm AM/PM") Copy and paste specialvaluesokesc Delete column A Gord On Wed, 10 Oct 2007 21:48:00 -0700, crazyfisher wrote: Yes, that is not what i want to see.... I was using the code by Mike, and it is working fine for general cells, but what if it is cells with formats? such as time value? such as 9 am,. if I use the code, it will change 9am to "0.375", I understand I should change the code to accomdate this , but I am not sure how. : "Gord Dibben" wrote: Yes. The original data will not be retained using that method. See next post about saving as a *.txt file without adding any quote marks in cells. Gord On Wed, 10 Oct 2007 21:06:02 -0700, crazyfisher wrote: the strange thing about this way is that all the value is reset to the active cell one... do I do sth wrong about that? "Gord Dibben" wrote: In namebox type A1:A84 and hit Enter key. Type " in active cell and hit CTRL + Enter together Just curious, but why would you want to do this? Gord Dibben MS Excel MVP On Wed, 10 Oct 2007 17:02:03 -0700, crazyfisher wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#16
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Mike
I not sure I understand your formula. New to excel and not sure how to use the formula. Where are you supposed to type "Cell A1 value = Test" ? The formula listed below is that supposed to be typed in the function bar? Can you please provide a step by step I would greatly appreciate it. Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "Mike" wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#17
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Mike's suggestion is to use a VBA macro to make the changes in place.
Might be easier for you to enter =""""&A1&"""" in B1 then double-click on the fill handle to copy down. Copy column B then select column A and EditPaste SpecialValuesOKEsc Gord Dibben MS Excel MVP On Thu, 16 Oct 2008 08:28:22 -0700, Led_A_Muck wrote: Hi Mike I not sure I understand your formula. New to excel and not sure how to use the formula. Where are you supposed to type "Cell A1 value = Test" ? The formula listed below is that supposed to be typed in the function bar? Can you please provide a step by step I would greatly appreciate it. Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "Mike" wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
#18
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Gord Dibben-
It worked! Thanks so much. "Gord Dibben" wrote: Mike's suggestion is to use a VBA macro to make the changes in place. Might be easier for you to enter =""""&A1&"""" in B1 then double-click on the fill handle to copy down. Copy column B then select column A and EditPaste SpecialValuesOKEsc Gord Dibben MS Excel MVP On Thu, 16 Oct 2008 08:28:22 -0700, Led_A_Muck wrote: Hi Mike I not sure I understand your formula. New to excel and not sure how to use the formula. Where are you supposed to type "Cell A1 value = Test" ? The formula listed below is that supposed to be typed in the function bar? Can you please provide a step by step I would greatly appreciate it. Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "Mike" wrote: VBA Can do it. This code will work on Column A Cells A1 thru the last Used cell in Column A I'm guessing you want to put "" around Values you already have in the cells. Before running code Cell A1 value = Test after you run the code Cell A1 = "Test" Sub addDoubleQuotation() lastcell = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To lastcell Range("A" & i).Value = """" & Range("A" & i).Value & """" Next End Sub "crazyfisher" wrote: Dear all, just want to know is it possible to autometically put a double quotation mark in the cell content within the same column? because there are 84 cells, i don't want to do it manually... thanks very much ! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel CSV file: How to preserve double quotation mark on Unix ftp? | Excel Discussion (Misc queries) | |||
all data begins with a quotation or apostrohe mark | Excel Discussion (Misc queries) | |||
Convert numbers that have hidden Quotation Mark Embedded | Excel Discussion (Misc queries) | |||
Single or Double Quotation Mark and it comes up twice | Setting up and Configuration of Excel | |||
how do I concatenate text that has a quotation mark | Excel Discussion (Misc queries) |