run macro only if condition is met
I need to run a macro (copy one cell into another) only if a certain
condition is met. For example, if x=a, then run this macro. If not, do something else. |
run macro only if condition is met
Sub Macro1()
If Cells(1, 1) = 1 Then Exit Sub Else MsgBox ("HI") End If End Sub -- Gary's Student "Nikonov" wrote: I need to run a macro (copy one cell into another) only if a certain condition is met. For example, if x=a, then run this macro. If not, do something else. |
run macro only if condition is met
Didn't you answer it
if x="a" then run thismacro else do something else end if -- Don Guillett SalesAid Software "Nikonov" wrote in message ... I need to run a macro (copy one cell into another) only if a certain condition is met. For example, if x=a, then run this macro. If not, do something else. |
All times are GMT +1. The time now is 08:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com