Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro based on cell value

Hi,

I wanted to run a macro based on cell value i.e., if i put in C2
number greater than zero it should trigger the macro named 'CUSTOMER'
if it is zero it should not . I am expecting a reply as early a
possible
thanks
nowfa

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Run macro based on cell value

Use this event in the sheet module to do this

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("C2"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value 0 Then
CUSTOMER
End If
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"nowfal " wrote in message ...
Hi,

I wanted to run a macro based on cell value i.e., if i put in C2 a
number greater than zero it should trigger the macro named 'CUSTOMER',
if it is zero it should not . I am expecting a reply as early as
possible
thanks
nowfal


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro based on cell value

Thanks alot Mr. Ron de bruin,
The code is perfectly correct. It works exactly what i wanted. I have
been trying for this for the last one week. Any how thanks once again.
by
nowfal


---
Message posted from http://www.ExcelForum.com/

Reply
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
macro to go to cell based upon a calculation MARK M Excel Discussion (Misc queries) 7 November 30th 08 01:28 AM
Macro based on Cell Value NPell Excel Worksheet Functions 2 June 17th 08 04:50 PM
Run a macro based on a cell value Lisa C. Excel Discussion (Misc queries) 1 March 31st 08 01:11 AM
Please help! Macro to change cell contents based on cell to the left Jennifer[_8_] Excel Programming 7 March 4th 04 01:06 AM
Run A Macro based on changes in cell Pete Excel Programming 2 December 2nd 03 03:08 PM


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

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"