#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default IF statement

Is it possible for an IF statement to check to see if a Cell is Highlighted
and if it is Highlighted (True) then do what ever I want. I want to go
through and add all the cell that are highlighted on my spreadsheet with a
formula so if I ever highlight new ones or un-highlight any if will change
the sum.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default IF statement

Short answer: No, not with an IF statement. IF cannot determine highlighted
property.


"dustinl15" wrote:

Is it possible for an IF statement to check to see if a Cell is Highlighted
and if it is Highlighted (True) then do what ever I want. I want to go
through and add all the cell that are highlighted on my spreadsheet with a
formula so if I ever highlight new ones or un-highlight any if will change
the sum.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default IF statement

Ok, Is there any funtion that can do this in Excel?

"JLatham" wrote:

Short answer: No, not with an IF statement. IF cannot determine highlighted
property.


"dustinl15" wrote:

Is it possible for an IF statement to check to see if a Cell is Highlighted
and if it is Highlighted (True) then do what ever I want. I want to go
through and add all the cell that are highlighted on my spreadsheet with a
formula so if I ever highlight new ones or un-highlight any if will change
the sum.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default IF statement

Not a function. You can do it with VBA and could develop a User Defined
Function from that. This question comes up quite often - seems maybe one of
these days such a feature should be added to Excel.

If you have used Conditional Formatting to get the cell highlighting, you
can use a helper cell/column to do it. You'd set up a test in the helper
cell that was pretty much the same type of test you did to do the conditional
formatting, and put a value in that helper cell to tell you whether the
source cell is shaded or not (0 = not shaded, 1 = shaded kind of thing).
Then you can do your math based on the contents of the helper cells.

If you're just highlighting/unhighlighting them manually, then VBA is about
the only way to attack it.

"dustinl15" wrote:

Ok, Is there any funtion that can do this in Excel?

"JLatham" wrote:

Short answer: No, not with an IF statement. IF cannot determine highlighted
property.


"dustinl15" wrote:

Is it possible for an IF statement to check to see if a Cell is Highlighted
and if it is Highlighted (True) then do what ever I want. I want to go
through and add all the cell that are highlighted on my spreadsheet with a
formula so if I ever highlight new ones or un-highlight any if will change
the sum.

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
SQL concatenation statement CLamar Excel Discussion (Misc queries) 0 June 29th 06 01:58 PM
If statement that does nothing when false higherlimits Excel Discussion (Misc queries) 1 May 26th 06 06:11 PM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


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