Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I delete the contents of a cell without deleting the formu | Excel Discussion (Misc queries) | |||
alert before deleting contents of a cell | Excel Discussion (Misc queries) | |||
Macro Help for Deleting Blank Rows & Clearing Cell Contents | Excel Programming | |||
Deleting rows dependent upon cell contents | Excel Programming | |||
looping through range and deleting cell contents. | Excel Programming |