Programatically Extend The Formila In A Cell

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Cell L4 has the formula:
=4 + 2 + 5
What is the code to extend the formula to:
=4 + 2 + 5 + 3

This may occur many times over time amd the number of additions could
approach 50.

Thanks!

Steve
 
Sub steve()
With Range("L4")
.Formula = .Formula & "+3"
End With
End Sub
 
Why are you asking such a basic question? For more than five years, you have
been claiming to be an Excel expert. Have you been lying about your skill
level?

Modifying a formula is simply a matter of modifying a string. Something that
is very basic and is common in all flavours of VBA, including Access VBA.

For the Regular Excel users: Sorry you have to put up with Steve, hopefully
he will behave himself in the Excel newsgroups, but from past experiences,
that is highly unlikely. Steve (aka PCdatasheet) has been abusing the Access
newsgroups for years with direct solicitations, telling users that the
regular experts are idiots and that the users can only get their problems
solved if they contact him and he will only charge a reasonable fee. When he
does post "helpful" answers, there is a good chance that it is misleading or
wrong.

If you are curious and would like to see more informtion about steve, one of
the regular Access posts has compiled a website
http://home.tiscali.nl/arracom/whoissteve.html

John... Visio MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top