Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have several cells that I need to delete the ' in front of text in that
cell. How do I write the code for this in VBA? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Right click your sheet tab, view code and paste this in and run it. Sub stantial() Application.ScreenUpdating = False For Each c In ActiveSheet.UsedRange If Not c.HasFormula Then c.Value = c.Text End If Next Application.ScreenUpdating = True End Sub Mike "iashorty" wrote: I have several cells that I need to delete the ' in front of text in that cell. How do I write the code for this in VBA? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 5 Jun., 22:05, iashorty wrote:
I have several cells that I need to delete the ' in front of text in that cell. How do I write the code for this in VBA? Hi Look at this Range("A1").Value = Mid(Range("A1").Value, 1) Regards, Per |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If this is a contiguous block of data, select it and run
With Selection .Value = .Value End With or this will work for everything. Select the cells and run Dim cell As Range For Each cell In Selection.Cells cell.Value = cell.Value Next -- Tim Zych www.higherdata.com Compare data in worksheets and find differences with Workbook Compare A free, powerful, flexible Excel utility "iashorty" wrote in message ... I have several cells that I need to delete the ' in front of text in that cell. How do I write the code for this in VBA? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Tim. This worked for me and I was able to understand what I was doing.
IAShorty "Tim Zych" wrote: If this is a contiguous block of data, select it and run With Selection .Value = .Value End With or this will work for everything. Select the cells and run Dim cell As Range For Each cell In Selection.Cells cell.Value = cell.Value Next -- Tim Zych www.higherdata.com Compare data in worksheets and find differences with Workbook Compare A free, powerful, flexible Excel utility "iashorty" wrote in message ... I have several cells that I need to delete the ' in front of text in that cell. How do I write the code for this in VBA? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 Macro to add text to front of data in cell | Excel Programming | |||
I want to put the text in the cell of column B in front of the the text in column D. | Excel Programming | |||
HowTo add a period to front of EVERY text cell in a Excel column | Excel Programming | |||
Formula for adding a comma in front of text in a cell | Excel Worksheet Functions | |||
Deleting Rows based on text in cell & formatting cell based on text in column beside it | Excel Programming |