Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created a VBA Macro and need it to run only if 2 different cells equal
a certain criteria. Example If L4=Monday and M10=12 then run Macro. What is my syntax in VBA? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Say the name of the macro is Macro1:
If range("L4") = "Monday" AND range("M10") = 12 then Macro1 "Erik K via OfficeKB.com" wrote in message ... I have created a VBA Macro and need it to run only if 2 different cells equal a certain criteria. Example If L4=Monday and M10=12 then run Macro. What is my syntax in VBA? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If Range("L4").Value = "Monday" And Range("M10").Value = 12 Then
Macro1 End If -- HTH Bob Phillips "Erik K via OfficeKB.com" wrote in message ... I have created a VBA Macro and need it to run only if 2 different cells equal a certain criteria. Example If L4=Monday and M10=12 then run Macro. What is my syntax in VBA? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! It worked perfectly!
Bob Phillips wrote: If Range("L4").Value = "Monday" And Range("M10").Value = 12 Then Macro1 End If I have created a VBA Macro and need it to run only if 2 different cells equal a certain criteria. Example If L4=Monday and M10=12 then run Macro. What is my syntax in VBA? -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |