Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ronbo
 
Posts: n/a
Default Change formula to Indirect

I need to change a lot of formulas to "Indirect".

Example, A1, =B1 - Need to change it to =Indirect("B1")

I have been trying find and replace;

Find =, Replace XIndirect("
This produces XIndirect("B1

How can I Find the end of formula and add, ")

Any ideas on how to add to the end of the formula or any other way of
changing a formula to indirect would be appreciated.

  #2   Report Post  
Ian
 
Posts: n/a
Default

Sub change_formula()
For c = 1 To 5
For r = 1 To 10
Cells(r, c).Formula = "=indirect(""" & Right(Cells(r, c).Formula,
Len(Cells(r, c).Formula) - 1) & """)"
Next r
Next c
End Sub

--
Ian
--
"Ronbo" wrote in message
...
I need to change a lot of formulas to "Indirect".

Example, A1, =B1 - Need to change it to =Indirect("B1")

I have been trying find and replace;

Find =, Replace XIndirect("
This produces XIndirect("B1

How can I Find the end of formula and add, ")

Any ideas on how to add to the end of the formula or any other way of
changing a formula to indirect would be appreciated.



  #3   Report Post  
Ronbo
 
Posts: n/a
Default

Ian -

Thanks a lot, that is exactly what I need. However, I am getting a syntax in

Cells(r, c).Formula = "=indirect(""" & Right(Cells(r, c).Formula,
Len(Cells(r, c).Formula) - 1) & """)"

which I copied and pasted. Any ideas?



"Ian" wrote:

Sub change_formula()
For c = 1 To 5
For r = 1 To 10
Cells(r, c).Formula = "=indirect(""" & Right(Cells(r, c).Formula,
Len(Cells(r, c).Formula) - 1) & """)"
Next r
Next c
End Sub

--
Ian
--
"Ronbo" wrote in message
...
I need to change a lot of formulas to "Indirect".

Example, A1, =B1 - Need to change it to =Indirect("B1")

I have been trying find and replace;

Find =, Replace XIndirect("
This produces XIndirect("B1

How can I Find the end of formula and add, ")

Any ideas on how to add to the end of the formula or any other way of
changing a formula to indirect would be appreciated.




  #4   Report Post  
Ian
 
Posts: n/a
Default

The text has been wordwrapped and those 2 lines should all be on one line.

--
Ian
--
"Ronbo" wrote in message
...
Ian -

Thanks a lot, that is exactly what I need. However, I am getting a syntax
in

Cells(r, c).Formula = "=indirect(""" & Right(Cells(r, c).Formula,
Len(Cells(r, c).Formula) - 1) & """)"

which I copied and pasted. Any ideas?



"Ian" wrote:

Sub change_formula()
For c = 1 To 5
For r = 1 To 10
Cells(r, c).Formula = "=indirect(""" & Right(Cells(r, c).Formula,
Len(Cells(r, c).Formula) - 1) & """)"
Next r
Next c
End Sub

--
Ian
--
"Ronbo" wrote in message
...
I need to change a lot of formulas to "Indirect".

Example, A1, =B1 - Need to change it to =Indirect("B1")

I have been trying find and replace;

Find =, Replace XIndirect("
This produces XIndirect("B1

How can I Find the end of formula and add, ")

Any ideas on how to add to the end of the formula or any other way of
changing a formula to indirect would be appreciated.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change formula for Employee Shift Schedule template Pam Soreide Excel Worksheet Functions 1 September 7th 05 03:10 AM
how do I change "fx" in formula bar to "=" rip Setting up and Configuration of Excel 1 September 1st 05 09:05 PM
how do i copy formula and change worksheet instead of cell dal0506 Excel Worksheet Functions 2 January 21st 05 08:41 PM
Cannot change a formula Richard F Excel Discussion (Misc queries) 1 January 18th 05 01:57 AM
How to use formula auditing to change upper case to Title Case. ScoobeyDoo Excel Worksheet Functions 1 November 19th 04 06:26 PM


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"