Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
koskyil
 
Posts: n/a
Default use replace to edit a formula with wildcards

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.


  #2   Report Post  
db
 
Posts: n/a
Default

If you want all the references to point to 'Grant Project 1'!J314, and all
the references are the same up to the '3' (i.e. you don't have anything like
'Grant Project 1'!J884) you can use this:

Search For: 'Grant Project 1'!J3*
Replace With: 'Grant Project 1'!J314

If that '3' does change, just change what you search for to 'Grant Project
1'!J*

Basically put the asteric after the spot in the formula you don't want to
change.
--
Regards,
db


"koskyil" wrote:

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.


  #3   Report Post  
Richard Neville
 
Posts: n/a
Default

If the repetition is always in column J, you can use Replace easily enough.
"Find what" would be !J, and Replace with !$J. If there are other columns
you will have to Replace separately for each. Try this on one or two numbers
before you "Replace all." You can't use a wild card in the Replace function.

"koskyil" wrote in message
...
I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using
wildcards
in place of the numbers?

Thanks in advance.




  #4   Report Post  
db
 
Posts: n/a
Default

Richard -
You can use the wildcard in the replace feature, you simply use the asterick
(*).
--
Regards,
db


"Richard Neville" wrote:

If the repetition is always in column J, you can use Replace easily enough.
"Find what" would be !J, and Replace with !$J. If there are other columns
you will have to Replace separately for each. Try this on one or two numbers
before you "Replace all." You can't use a wild card in the Replace function.

"koskyil" wrote in message
...
I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using
wildcards
in place of the numbers?

Thanks in advance.





  #5   Report Post  
koskyil
 
Posts: n/a
Default

But I need to insert a $ after the J. I've tried
Search For: ='Grant Project 1'!J*
Replace With: ='Grant Project 1'!J$*
but I get an error message...?


"db" wrote:

If you want all the references to point to 'Grant Project 1'!J314, and all
the references are the same up to the '3' (i.e. you don't have anything like
'Grant Project 1'!J884) you can use this:

Search For: 'Grant Project 1'!J3*
Replace With: 'Grant Project 1'!J314

If that '3' does change, just change what you search for to 'Grant Project
1'!J*

Basically put the asteric after the spot in the formula you don't want to
change.
--
Regards,
db


"koskyil" wrote:

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.




  #6   Report Post  
db
 
Posts: n/a
Default

Why are you replacing with J$*? I thought you needed J$314?

What is the error message you are receiving?
--
Regards,
db


"koskyil" wrote:

But I need to insert a $ after the J. I've tried
Search For: ='Grant Project 1'!J*
Replace With: ='Grant Project 1'!J$*
but I get an error message...?


"db" wrote:

If you want all the references to point to 'Grant Project 1'!J314, and all
the references are the same up to the '3' (i.e. you don't have anything like
'Grant Project 1'!J884) you can use this:

Search For: 'Grant Project 1'!J3*
Replace With: 'Grant Project 1'!J314

If that '3' does change, just change what you search for to 'Grant Project
1'!J*

Basically put the asteric after the spot in the formula you don't want to
change.
--
Regards,
db


"koskyil" wrote:

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.


  #7   Report Post  
Harlan Grove
 
Posts: n/a
Default

db wrote...
Richard -
You can use the wildcard in the replace feature, you simply use the asterick
(*).

....

* or ? (or ~) in the Replace field each represent literal characters.
If cell A1 contained the formula =X99 and the find text were X* and the
replacement text X$*, then Excel would display an error message when
you tried this replacement. Change A1 to the text X99 and run the
repacement again to see that it changes the cell to X$*.

In other words, * and ? and ~ aren't treated like wildcards in replace
text.

  #8   Report Post  
db
 
Posts: n/a
Default

Oh I understand Richard's comment. Ya "wild card's" aren't treated as wild
cards in the "Replace" line, only in the "Search" line.
--
Regards,
db


"Harlan Grove" wrote:

db wrote...
Richard -
You can use the wildcard in the replace feature, you simply use the asterick
(*).

....

* or ? (or ~) in the Replace field each represent literal characters.
If cell A1 contained the formula =X99 and the find text were X* and the
replacement text X$*, then Excel would display an error message when
you tried this replacement. Change A1 to the text X99 and run the
repacement again to see that it changes the cell to X$*.

In other words, * and ? and ~ aren't treated like wildcards in replace
text.


  #9   Report Post  
koskyil
 
Posts: n/a
Default

I need to maintain all the numbers after the J (J314, J317, J320...) and make
them J$314, J$317, J$320...
The message is "The formula you typed contains an error"

"db" wrote:

Why are you replacing with J$*? I thought you needed J$314?

What is the error message you are receiving?
--
Regards,
db


"koskyil" wrote:

But I need to insert a $ after the J. I've tried
Search For: ='Grant Project 1'!J*
Replace With: ='Grant Project 1'!J$*
but I get an error message...?


"db" wrote:

If you want all the references to point to 'Grant Project 1'!J314, and all
the references are the same up to the '3' (i.e. you don't have anything like
'Grant Project 1'!J884) you can use this:

Search For: 'Grant Project 1'!J3*
Replace With: 'Grant Project 1'!J314

If that '3' does change, just change what you search for to 'Grant Project
1'!J*

Basically put the asteric after the spot in the formula you don't want to
change.
--
Regards,
db


"koskyil" wrote:

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.


  #10   Report Post  
db
 
Posts: n/a
Default

Got ya... this should work in that case:

Search For: J
Replace with: J$

--
Regards,
db


"koskyil" wrote:

I need to maintain all the numbers after the J (J314, J317, J320...) and make
them J$314, J$317, J$320...
The message is "The formula you typed contains an error"

"db" wrote:

Why are you replacing with J$*? I thought you needed J$314?

What is the error message you are receiving?
--
Regards,
db


"koskyil" wrote:

But I need to insert a $ after the J. I've tried
Search For: ='Grant Project 1'!J*
Replace With: ='Grant Project 1'!J$*
but I get an error message...?


"db" wrote:

If you want all the references to point to 'Grant Project 1'!J314, and all
the references are the same up to the '3' (i.e. you don't have anything like
'Grant Project 1'!J884) you can use this:

Search For: 'Grant Project 1'!J3*
Replace With: 'Grant Project 1'!J314

If that '3' does change, just change what you search for to 'Grant Project
1'!J*

Basically put the asteric after the spot in the formula you don't want to
change.
--
Regards,
db


"koskyil" wrote:

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.




  #11   Report Post  
Harlan Grove
 
Posts: n/a
Default

db wrote...
Got ya... this should work in that case:

Search For: J
Replace with: J$

....

That'll also fubar the formulas unless you're matching case. Even then
it wouldn't be robust if there could be worksheet names that include
capital J's, e.g., 'Jan Budget'. The *safe* way to do this is to find

!J

and replace it with

!J$

which could still alter text within test constants.

  #12   Report Post  
koskyil
 
Posts: n/a
Default

Of course. Sometimes the answer is right there in front of your face...
Thanks much.

"db" wrote:

Got ya... this should work in that case:

Search For: J
Replace with: J$

--
Regards,
db


"koskyil" wrote:

I need to maintain all the numbers after the J (J314, J317, J320...) and make
them J$314, J$317, J$320...
The message is "The formula you typed contains an error"

"db" wrote:

Why are you replacing with J$*? I thought you needed J$314?

What is the error message you are receiving?
--
Regards,
db


"koskyil" wrote:

But I need to insert a $ after the J. I've tried
Search For: ='Grant Project 1'!J*
Replace With: ='Grant Project 1'!J$*
but I get an error message...?


"db" wrote:

If you want all the references to point to 'Grant Project 1'!J314, and all
the references are the same up to the '3' (i.e. you don't have anything like
'Grant Project 1'!J884) you can use this:

Search For: 'Grant Project 1'!J3*
Replace With: 'Grant Project 1'!J314

If that '3' does change, just change what you search for to 'Grant Project
1'!J*

Basically put the asteric after the spot in the formula you don't want to
change.
--
Regards,
db


"koskyil" wrote:

I have the following formula:
='Grant Project 1'!J314
but it's repeated in a column, each time with a different number
(i.e. ='Grant Project 1'!J314, ='Grant Project 1'!J317, ='Grant Project
1'!J320...)
and I want to replace each occurance with
='Grant Project 1'!J$314
Is there a way to use the replace tool to insert the '$' by using wildcards
in place of the numbers?

Thanks in advance.


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
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Named SUM Formula with relative refernce(s) Werner Rohrmoser Excel Worksheet Functions 2 April 20th 05 04:56 PM
Relative Indirect Formula Referencing? Damian Excel Worksheet Functions 1 January 7th 05 04:16 AM
Replace using wildcards jeb Excel Discussion (Misc queries) 6 January 6th 05 03:35 PM
How do I replace a negative number at the end of a formula with a. dealn2 Excel Discussion (Misc queries) 5 December 23rd 04 07:47 PM


All times are GMT +1. The time now is 01:45 PM.

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

About Us

"It's about Microsoft Excel"