Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
pim_parra
 
Posts: n/a
Default Help? start macro automatic in excel


Hi,
Who has some code for the following problem:

supose a value in cell a1 and an other in cell b1
i want to start a macro automatical
when for example value a1 b1
in other words how tot start of a macro when a
certain condition is true
thanks


--
pim_parra
------------------------------------------------------------------------
pim_parra's Profile: http://www.msusenet.com/member.php?userid=418
View this thread: http://www.msusenet.com/t-1869401224

  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

One way:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column 2 Then Exit Sub
If Cells(Target.Row, 1) Cells(Target.Row, 2) Then
'Put what you want to do here
End If
End Sub

This macro is triggered to execute whenever the contents of any cell on the
entire sheet is changed. The code in the macro specifically says to do
nothing if the changed cell is not in either column A or Column B. If the
content of Column A is greater than that of Column B in the row of the
changed cell, the code will execute the code you place in the space labeled
" 'Put what you want to do here".
This macro must be placed in the sheet module of the sheet that holds the
data you want it to operate on. Right-click on the sheet tab, select View
Code, and paste this macro in the displayed module. HTH Otto
"pim_parra" wrote in message
...

Hi,
Who has some code for the following problem:

supose a value in cell a1 and an other in cell b1
i want to start a macro automatical
when for example value a1 b1
in other words how tot start of a macro when a
certain condition is true
thanks


--
pim_parra
------------------------------------------------------------------------
pim_parra's Profile: http://www.msusenet.com/member.php?userid=418
View this thread: http://www.msusenet.com/t-1869401224



  #3   Report Post  
pim_parra
 
Posts: n/a
Default


Thanks Otto,

I made some modification as folows
i now compare the values in 2 colums
when the first value=1 and the other = 2 the email is sent
that works fine, thanks
There is only one problem it works fine as long as
the colums contain value's
how to do it when ther are formulas in both colums

s.y.
Do


--
pim_parra
------------------------------------------------------------------------
pim_parra's Profile: http://www.msusenet.com/member.php?userid=418
View this thread: http://www.msusenet.com/t-1869401224

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
Problem Editing Macro in Shared Excel File [email protected] Excel Discussion (Misc queries) 1 March 19th 05 06:43 PM
double click a xls file and start Excel but without the file Danyi, Attila Excel Discussion (Misc queries) 2 December 22nd 04 02:19 PM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM
How can I get a macro in Excel to set the Zoom to "Selection"? GarryH Excel Discussion (Misc queries) 2 December 21st 04 01:44 PM
Turning a Macro into an add-in for Excel? John Excel Worksheet Functions 1 December 8th 04 09:53 PM


All times are GMT +1. The time now is 01:49 AM.

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

About Us

"It's about Microsoft Excel"