LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Placing macros within the IF condition

Perhaps this will do as you wish.........

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
If Target.Value = 1 Then Call macroA
If Target.Value = 2 Then Call macroB
If Target.Value = 3 Then Call macroC
End If
End Sub

Vaya con Dios,
Chuck, CABGx3



"Sonia" wrote:

Hi...

I would like to run the below condition in excel.

If value of column A=1 then run macro A
If value of column A=2 then run macro B
If value of column A=3 then run macro C

Please help..

Bye for now
Sonia



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Placing Russ Excel Worksheet Functions 3 July 25th 06 01:56 PM
placing.. 1st, 2nd, 3rd... fivermsg Excel Discussion (Misc queries) 1 March 14th 06 02:21 AM
Placing bubbles laszlo Charts and Charting in Excel 5 August 8th 05 04:25 PM
placing Stig Excel Worksheet Functions 0 February 3rd 05 10:30 PM


All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"