Excuting a macro within an "IF" statement

  • Thread starter Thread starter Tom Rinks
  • Start date Start date
T

Tom Rinks

Can anyone help me write a VB function that will execute a macro whe
the true part of an IF function has been met. I am checking tw
columns of values to see if they match. If they do, I want to mov
that record to a different sheet and delete the row that the record wa
in.

Any help would be appreciated.

Thanks,

To
 
Tom,

You cannot do that in a worksheet formula. You could trap the value as it is
input, and execute here, that is as part of a worksheet event.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Tom
you can't do this wihtin an IF clause as UDFs can only return values.
The only way would be to use the worksheet_change event and test for
the condition.

Frank
 
Hi

It's impossible. No function in Excel can change anything on sheet or
trigger anything - it only returns result. Write a procedure, whcich checks
values and moves records, when started. Or write a change event for
worksheet - but you may find that not a good idea at end.
 
Back
Top