Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how do I insert an ' in front of many rows of numbers?
I have a column of numbers 1,800 rows long that needs an ' in front of every
row. How do I do this? |
#2
|
|||
|
|||
Hold down [Alt]+F11
From the menu "Insert", "Module" Copy and paste this code into the module Hold down [Alt]+F11 to go back to your workbook Select the cells to which you want to add an apostrophe Hold down [Alt]+F8 Double Click "AddApostropheToRange" This should do it. Hope this helps Pete Sub AddApostropheToRange() Dim CellToModify As Object For Each CellToModify In Selection CellToModify.Formula = "'" & CellToModify.Formula Next CellToModify End Sub Note Line 4 contains an apostrophe surrounded by double quotes "jnycks" wrote: I have a column of numbers 1,800 rows long that needs an ' in front of every row. How do I do this? |
#3
|
|||
|
|||
If you just need them to be text, format the column as text. If you need that extra character iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 to iLastRow Cells(i,"A").Value = "'" & Cells(i,"A").Value Next i -- HTH RP (remove nothere from the email address if mailing direct) "jnycks" wrote in message ... I have a column of numbers 1,800 rows long that needs an ' in front of every row. How do I do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert rows based on specific value | Excel Worksheet Functions | |||
can't insert more rows even though not at max rows | Excel Worksheet Functions | |||
Insert rows | Excel Worksheet Functions | |||
INSERT ROWS WITHOUT SCREWING-UP FORMULAS! | Excel Worksheet Functions | |||
Challenging Charting | Charts and Charting in Excel |