View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default can you make an IF command run a macro???

you could use worksheet event code. right click on your worksheet, select
view code, and paste following into the code window that appears.

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("U18").Value = 2 Then Call macro1
End Sub

where macro1 is the name of your macro. or, you can incorporate your macro
code into this worksheet event handler instead of calling the macro.




"bigtonyicu" wrote:


Hey guys,

I need to get a macro (macro name is Superscript) to run automaticly if
the total of cell U18 = 2

Can I do it with an if command expample:
=if(U18=2, "???", " ")

??? = run superscript

or

I"m a newb at VB... could someone supply me with a VB script to do
this.


--
bigtonyicu
------------------------------------------------------------------------
bigtonyicu's Profile: http://www.excelforum.com/member.php...o&userid=22430
View this thread: http://www.excelforum.com/showthread...hreadid=478242