ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   replacing value in formula from outside worksheet? (https://www.excelbanter.com/excel-discussion-misc-queries/181077-replacing-value-formula-outside-worksheet.html)

Mike[_4_]

replacing value in formula from outside worksheet?
 
We know we can start up a spreadsheet from the command prompt: excel
<spreadsheetname.
We've seen batch files which allow one to specify a replacable
parameter in the batchfile from the command line. I'm trying to do
something similar in Excel.

Assume A1:A4 is populated with the names Bob,Ted,Carol,Alice, and I've
written the following formula for Column B: =If((A1:A4)="Bob",1,0).
this will return a '1' in B1, and "0" in B2-B4.

Now, I want to change "Bob" to "Ted" from the command line. I"m
looking for someway to identify a field as replacable, and to perform
the replacement.

Any suggestions? - Mike


Art

replacing value in formula from outside worksheet?
 
If I understand correctly your question, then you might want to use the find
replace feature.

"Mike" wrote:

We know we can start up a spreadsheet from the command prompt: excel
<spreadsheetname.
We've seen batch files which allow one to specify a replacable
parameter in the batchfile from the command line. I'm trying to do
something similar in Excel.

Assume A1:A4 is populated with the names Bob,Ted,Carol,Alice, and I've
written the following formula for Column B: =If((A1:A4)="Bob",1,0).
this will return a '1' in B1, and "0" in B2-B4.

Now, I want to change "Bob" to "Ted" from the command line. I"m
looking for someway to identify a field as replacable, and to perform
the replacement.

Any suggestions? - Mike



Mike[_4_]

replacing value in formula from outside worksheet?
 
I believe find/replace would change the data; I'm trying to replace a
value in the formula - Mike


On Mar 24, 9:36*am, art wrote:
If I understand correctly your question, then you might want to use the find
replace feature.



"Mike" wrote:
We know we can start up a spreadsheet from the command prompt: excel
<spreadsheetname.
We've seen batch files which allow one to specify a replacable
parameter in the batchfile from the command line. I'm trying to do
something similar in Excel.


Assume A1:A4 is populated with the names Bob,Ted,Carol,Alice, and I've
written the following formula for Column B: =If((A1:A4)="Bob",1,0).
this will return a '1' in B1, and "0" in B2-B4.


Now, I want to change "Bob" to "Ted" from the command line. *I"m
looking for someway to identify a field as replacable, and to perform
the replacement.


Any suggestions? - Mike- Hide quoted text -


- Show quoted text -



Art

replacing value in formula from outside worksheet?
 
No. try it, it can change the value of the formula as well.

"Mike" wrote:

I believe find/replace would change the data; I'm trying to replace a
value in the formula - Mike


On Mar 24, 9:36 am, art wrote:
If I understand correctly your question, then you might want to use the find
replace feature.



"Mike" wrote:
We know we can start up a spreadsheet from the command prompt: excel
<spreadsheetname.
We've seen batch files which allow one to specify a replacable
parameter in the batchfile from the command line. I'm trying to do
something similar in Excel.


Assume A1:A4 is populated with the names Bob,Ted,Carol,Alice, and I've
written the following formula for Column B: =If((A1:A4)="Bob",1,0).
this will return a '1' in B1, and "0" in B2-B4.


Now, I want to change "Bob" to "Ted" from the command line. I"m
looking for someway to identify a field as replacable, and to perform
the replacement.


Any suggestions? - Mike- Hide quoted text -


- Show quoted text -




Gord Dibben

replacing value in formula from outside worksheet?
 
You cannot do anything from the command line other than open a specific
workbook.

To make changes upon opening, you would require workbook_open event code in the
workbook.


Gord Dibben MS Excel MVP

On Mon, 24 Mar 2008 06:10:52 -0700 (PDT), Mike wrote:

We know we can start up a spreadsheet from the command prompt: excel
<spreadsheetname.
We've seen batch files which allow one to specify a replacable
parameter in the batchfile from the command line. I'm trying to do
something similar in Excel.

Assume A1:A4 is populated with the names Bob,Ted,Carol,Alice, and I've
written the following formula for Column B: =If((A1:A4)="Bob",1,0).
this will return a '1' in B1, and "0" in B2-B4.

Now, I want to change "Bob" to "Ted" from the command line. I"m
looking for someway to identify a field as replacable, and to perform
the replacement.

Any suggestions? - Mike




All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com