#1   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Functions

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default Functions

Possible with a VBA-Function like :

Function cValue(rng As Range, xValue)
Application.Volatile
If rng.Interior.ColorIndex = 3 Or rng.Font.ColorIndex = 3 Then cValue = xValue
End Function

in ur sheet type : =cValue(any-cell,any-value)


"Tim" skrev:

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Functions

Just a note. Changing a cells background colour does not force a calculation.
So when you first change the background the value will not show up. It will
show up as soon as any action is taken that cuases a calculation anywhere in
the application.
--
HTH...

Jim Thomlinson


"excelent" wrote:

Possible with a VBA-Function like :

Function cValue(rng As Range, xValue)
Application.Volatile
If rng.Interior.ColorIndex = 3 Or rng.Font.ColorIndex = 3 Then cValue = xValue
End Function

in ur sheet type : =cValue(any-cell,any-value)


"Tim" skrev:

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Functions

Can you teach me how to do that? Please in detail... Many thanks in advance! :)

"excelent" wrote:

Possible with a VBA-Function like :

Function cValue(rng As Range, xValue)
Application.Volatile
If rng.Interior.ColorIndex = 3 Or rng.Font.ColorIndex = 3 Then cValue = xValue
End Function

in ur sheet type : =cValue(any-cell,any-value)


"Tim" skrev:

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Functions

Hi
A good and a bad news!

I did it! :-)

But, the file became 4MB in size... :'(

"Tim" wrote:

Can you teach me how to do that? Please in detail... Many thanks in advance! :)

"excelent" wrote:

Possible with a VBA-Function like :

Function cValue(rng As Range, xValue)
Application.Volatile
If rng.Interior.ColorIndex = 3 Or rng.Font.ColorIndex = 3 Then cValue = xValue
End Function

in ur sheet type : =cValue(any-cell,any-value)


"Tim" skrev:

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default Functions

Brand new workbook with 3 tabs and a x in A1 : 13,5 KB
Same workbook with my Function : 19,0 KB

dono what goes wron in ur case :-)


"Tim" skrev:

Hi
A good and a bad news!

I did it! :-)

But, the file became 4MB in size... :'(

"Tim" wrote:

Can you teach me how to do that? Please in detail... Many thanks in advance! :)

"excelent" wrote:

Possible with a VBA-Function like :

Function cValue(rng As Range, xValue)
Application.Volatile
If rng.Interior.ColorIndex = 3 Or rng.Font.ColorIndex = 3 Then cValue = xValue
End Function

in ur sheet type : =cValue(any-cell,any-value)


"Tim" skrev:

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!

  #7   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Functions

Maybe because I copied it to an entire column...

"excelent" wrote:

Brand new workbook with 3 tabs and a x in A1 : 13,5 KB
Same workbook with my Function : 19,0 KB

dono what goes wron in ur case :-)


"Tim" skrev:

Hi
A good and a bad news!

I did it! :-)

But, the file became 4MB in size... :'(

"Tim" wrote:

Can you teach me how to do that? Please in detail... Many thanks in advance! :)

"excelent" wrote:

Possible with a VBA-Function like :

Function cValue(rng As Range, xValue)
Application.Volatile
If rng.Interior.ColorIndex = 3 Or rng.Font.ColorIndex = 3 Then cValue = xValue
End Function

in ur sheet type : =cValue(any-cell,any-value)


"Tim" skrev:

Hi,

Is it possible to do a formula like when cell background (or font color) is
red, a certain cell will return some value?

Thanks!

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
XL2003 FILTER FUNCTIONS VS. XL2007 FILTER FUNCTIONS RET70168 Excel Worksheet Functions 0 June 15th 07 01:00 AM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
functions Mike Excel Worksheet Functions 8 June 2nd 06 07:16 AM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM


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