Start a macro inside an IF-function

  • Thread starter Thread starter Thomas
  • Start date Start date
T

Thomas

Hi,

Does anyone know if it is possible to start a recorded macro fro
inside an if-function?

Example: IF(A1 < A2; "start macro"; "do nothing")

The stored macro is sort of a header, red background and merged cell
with a text in the middle. I would like it to start when a value in th
next row changes. And the header should be placed between A1 and A2.

Take care,
Thoma
 
Thomas,

You can run a VBA function within a worksheet form ulna, as long as it
simply returns a value to the calling cell.

What you want may best be achieved by use of worksheet events. Here is an
example of the calculate event which

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Sounds like you should be using conditional formatting for what you wan
to do (from Format menu). Here, you can set parameters for if you
conditions holds, then to re-arrange format of cells. If this does no
work, then if you are clearer on what exacatly the macro does, the
sure there is work-around. I don't think you can run macro from I
statement
 

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