PC Review


Reply
Thread Tools Rate Thread

Deleting ' before cell contents

 
 
=?Utf-8?B?QW5keQ==?=
Guest
Posts: n/a
 
      19th Mar 2007
I ill-advisedly added ' before a bunch of formulas because I wanted to move
the formulas between workbooks and have them reference the current workbook.
I thought that I would be able to find and replace the ' from the formula but
I am having trouble doing that. (I Believe it is char(39) FYI).

Does know of a way to remedy this.

Thanks,
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      19th Mar 2007
Andy,

I tried this subroutine and it worked.

Sub test()
Dim c As Range
For Each c In ActiveSheet.UsedRange
If Left(c.Value, 1) = "=" Then
c.Formula = c.Value
End If
Next c
End Sub



--

Hope that helps.

Vergel Adriano


"Andy" wrote:

> I ill-advisedly added ' before a bunch of formulas because I wanted to move
> the formulas between workbooks and have them reference the current workbook.
> I thought that I would be able to find and replace the ' from the formula but
> I am having trouble doing that. (I Believe it is char(39) FYI).
>
> Does know of a way to remedy this.
>
> Thanks,

 
Reply With Quote
 
=?Utf-8?B?QW5keQ==?=
Guest
Posts: n/a
 
      19th Mar 2007
That worked.

Does anyone happen to know of a way to circumvent this problem? By that I
mean a way to copy formulas from one workbook to another without having them
refer back to the original workbook.


"Vergel Adriano" wrote:

> Andy,
>
> I tried this subroutine and it worked.
>
> Sub test()
> Dim c As Range
> For Each c In ActiveSheet.UsedRange
> If Left(c.Value, 1) = "=" Then
> c.Formula = c.Value
> End If
> Next c
> End Sub
>
>
>
> --
>
> Hope that helps.
>
> Vergel Adriano
>
>
> "Andy" wrote:
>
> > I ill-advisedly added ' before a bunch of formulas because I wanted to move
> > the formulas between workbooks and have them reference the current workbook.
> > I thought that I would be able to find and replace the ' from the formula but
> > I am having trouble doing that. (I Believe it is char(39) FYI).
> >
> > Does know of a way to remedy this.
> >
> > Thanks,

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      19th Mar 2007
I'd use the same technique as you did--but with a different string:

Select all the cells
edit|replace
what: = (equal sign)
with: $$$$$=
replace all.

Then do the copy.

When you're done, you can reverse the edit|replace.

The choice of using the apostrophe was your Achille's heal.



Andy wrote:
>
> That worked.
>
> Does anyone happen to know of a way to circumvent this problem? By that I
> mean a way to copy formulas from one workbook to another without having them
> refer back to the original workbook.
>
> "Vergel Adriano" wrote:
>
> > Andy,
> >
> > I tried this subroutine and it worked.
> >
> > Sub test()
> > Dim c As Range
> > For Each c In ActiveSheet.UsedRange
> > If Left(c.Value, 1) = "=" Then
> > c.Formula = c.Value
> > End If
> > Next c
> > End Sub
> >
> >
> >
> > --
> >
> > Hope that helps.
> >
> > Vergel Adriano
> >
> >
> > "Andy" wrote:
> >
> > > I ill-advisedly added ' before a bunch of formulas because I wanted to move
> > > the formulas between workbooks and have them reference the current workbook.
> > > I thought that I would be able to find and replace the ' from the formula but
> > > I am having trouble doing that. (I Believe it is char(39) FYI).
> > >
> > > Does know of a way to remedy this.
> > >
> > > Thanks,


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: alert before deleting contents of a cell Otto Moehrbach Microsoft Excel Misc 1 15th Dec 2006 04:30 PM
Deleting rows dependent upon cell contents =?Utf-8?B?ZGFlZGFsdXMx?= Microsoft Excel Programming 4 25th Oct 2005 02:05 PM
How do I allow users to edit a cell's contents, but prevent them from moving, cutting or deleting the cell? Dan E Microsoft Excel Discussion 4 28th Mar 2005 09:34 PM
How do i allow users to edit a cell's contents, but prevent them from moving, cutting or deleting the cell? Dan E Microsoft Excel Programming 7 28th Mar 2005 12:44 AM
referencing cell contents, after deleting and shifting new contents into cell HM Microsoft Excel Misc 1 6th Feb 2004 10:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:57 PM.