LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
42410
 
Posts: n/a
Default automatically running a macro

Hello,
I have written a macro which operates by means of ctrl + Q. (This letter was
merely an arbitrary choice!)

The action is as follows:-
1. Enter new data in a cell then press <ENTER
2. The data is then automatically compared with the contents of a cell on
different sheet
3. If the new cell data is greater than or equal in value to that data in
the cell on the other sheet then change the font colour of the new cell data
to red and display the difference between the two cells in a cell in another
column
4. Otherwise just display the new contents of the cell in a black font
colour as normal and do nothing else

I have the code to do all this in the macro but I want to make the code run
automatically when I press <ENTER after updating the contents of any one of
several cells on a worksheet.

I don't know how to do this by means of an IF function, as it requires
several things to happen as the data in the cell is entered.

Can anyone tell me how to do it?

Thank you in advance for your kind help.

Steve


 
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
Automatically run Macro tamato43 Excel Discussion (Misc queries) 0 March 30th 05 03:51 PM
How to stop getting the file save box when running a macro Pank Mehta Excel Discussion (Misc queries) 1 March 29th 05 04:05 PM
Running a VBA Macro Jeff Excel Discussion (Misc queries) 2 March 15th 05 02:13 PM
Shadows of the Pivottable Field List while macro is running David P Excel Worksheet Functions 0 February 25th 05 07:11 PM
Running VBA Macro Jeff Excel Discussion (Misc queries) 1 February 15th 05 01:12 PM


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