Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Auto run macro depend on cell value

What function runs a macro if a condition is a true?
Please , without need to run it by clicking any thing just when a cell
condition is true , it is auto run.
Thank you

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Auto run macro depend on cell value

hi
you might be looking at the worksheet change event. A macro that runs when
changes are made to the sheet.
example......
Private sub Worksheet_SelectionChange(ByVal Target as range)
If Cells(1,1) 1 then
Call macro1
else
exit sub
end if
end sub

Macro1 would be your macro possible in a standard module or it could be in
the worksheet change module. more than one way to do this.

hope this helped
regards
FSt1

"Khaled" wrote:

What function runs a macro if a condition is a true?
Please , without need to run it by clicking any thing just when a cell
condition is true , it is auto run.
Thank you

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Auto run macro depend on cell value



"FSt1" wrote:

hi
you might be looking at the worksheet change event. A macro that runs when
changes are made to the sheet.
example......
Private sub Worksheet_SelectionChange(ByVal Target as range)
If Cells(1,1) 1 then
Call macro1
else
exit sub
end if
end sub

Macro1 would be your macro possible in a standard module or it could be in
the worksheet change module. more than one way to do this.

hope this helped
regards
FSt1

"Khaled" wrote:

What function runs a macro if a condition is a true?
Please , without need to run it by clicking any thing just when a cell
condition is true , it is auto run.
Thank you

Hi
I'm new to macro in excel
Often i record macro then edit it
I copied your answer and paste it before my macro it doesn't work
Pls, can you til me in more details what to do if i want to run macro1 if
cell a1 =5 for example
thanks in advance

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
How can I have have one column's input depend on the variables in a second one? willb Excel Worksheet Functions 3 October 18th 06 12:31 PM
Macro - Auto Run Gary Excel Worksheet Functions 1 May 12th 06 08:29 PM
'Copy to' Advance Filter depend only on sheet ID not start sheet Sandy Yates Excel Worksheet Functions 0 April 4th 06 03:48 AM
How to show data from other sheet depend on value?? Malka Excel Worksheet Functions 3 February 27th 06 08:51 AM
macro for auto sum ahemani New Users to Excel 2 July 29th 05 12:53 AM


All times are GMT +1. The time now is 07:06 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"