Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Don
 
Posts: n/a
Default How can I embed a macro into a function in excel?

I'm trying to create a logical "if" statment that will turn a cell one color
or another depending on what is in another cell. How does one insert/trigger
a macro in a function?
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Try using Conditional Formatting instead.

Select A1. Choose Format/Conditional Formatting. Enter

CF1: Formula is =A210
Format1: Patterns/Red

Click OK.

Now when you enter a value 10 in A2, cell A1 turns red.

If you need more than 3 conditional colors, you'll have to use an event
macro, such as a Worksheet_Calculate or Worksheet_Change:

http://cpearson.com/excel/events.htm


In article ,
Don wrote:

I'm trying to create a logical "if" statment that will turn a cell one color
or another depending on what is in another cell. How does one insert/trigger
a macro in a function?

  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Don

Investigate the use of FormatConditional Formatting. Allows 3 conditions(4
if you count the default)

You could use the Formula is:

e.g.

condition 1 =A1="qwerty" format to blue color.

Add and condition 2 =A1123 format to red color.

Add and condition 3 =A1=123 format to green color.

Functions cannot call macros.


Gord Dibben Excel MVP

On Thu, 27 Jan 2005 14:39:01 -0800, Don wrote:

I'm trying to create a logical "if" statment that will turn a cell one color
or another depending on what is in another cell. How does one insert/trigger
a macro in a function?


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
How do I embed fonts in excel? David Setting up and Configuration of Excel 1 December 1st 04 12:37 AM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


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