Changing numeric values in row of text.

rlnye

New Member
Joined
Apr 7, 2002
Messages
43
Can a macro change a numeric value in a row of text...let's say I have a row of text and the numeric value 75 is located somewhere in the text and I wanted to replace 75 with whatever value is in cell "B1" The value in "C1" will change frequently.

This is one great forum...and I know that I speak for all of us that struggle with Excel...we thank you very much.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
There are probably a number of ways to do this, but you'll need to be a little clearer about what you want - what's with "c1" in your post? a typo? You say you have a row of text with a numeric value in there...do you mean 75 held as a text value?...

More info please!

Paddy
 
Upvote 0
I have a bid sheet I am trying to automate and need to change a numeric value inserted in a row of text...such as the following.

"Lump Sum Rate is for this project for a period not to exceed 75 calendar days...."

I would like the 75 replaced with whatever value that is in cell "C1"...the value in C1 will change with every bid sent out.

Hope this explains it a litte better...thanks
 
Upvote 0
Thanks for the reply. I tried Substitute and it worked, but not exactly as I need to to. What I really need is the following:

Cell A4..."Jane has 10 apples"
Cell A5..."John has 10 pears"

Cell A1... 12

What I really need is whenever I change the numeric value in cell A1 say from 10 to 12, the value "10" is changed in the string of text in cells A4:A5

Is this possible to do? Thanks again for your help
 
Upvote 0
On 2002-08-26 07:12, rlnye wrote:
Thanks for the reply. I tried Substitute and it worked, but not exactly as I need to to. What I really need is the following:

Cell A4..."Jane has 10 apples"
Cell A5..."John has 10 pears"

Cell A1... 12

What I really need is whenever I change the numeric value in cell A1 say from 10 to 12, the value "10" is changed in the string of text in cells A4:A5

Is this possible to do? Thanks again for your help

Do the numbers to be replaced have a fixed location in the target string like nth word or 60th char as start?
 
Upvote 0
On 2002-08-26 07:12, rlnye wrote:
Thanks for the reply. I tried Substitute and it worked, but not exactly as I need to to. What I really need is the following:

Cell A4..."Jane has 10 apples"
Cell A5..."John has 10 pears"

Cell A1... 12

What I really need is whenever I change the numeric value in cell A1 say from 10 to 12, the value "10" is changed in the string of text in cells A4:A5

Is this possible to do? Thanks again for your help

Would something like this help?
in cell A4 "Jane has "&+C1&" apples"

HTH
texasalynn
 
Upvote 0
I had a similiar problem, though I was trying to input a string of changing text into a line on a form letter. I beleive it will work for your problem...

use the CONCATENATE formula, which allows for joining multiple strings of text. It will also allow the contents of a cell.

It has a handy little box that allows you to join it all together, but it would look like this:
=CONCATENATE("We need ",A11," apples on tuesday.")

I hope this helps!

mike
msignorini@snowwolf.younglife.org
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,207
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top