ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Defining Cells to be Added using SUMIF (https://www.excelbanter.com/new-users-excel/19158-defining-cells-added-using-sumif.html)

Pappey

Defining Cells to be Added using SUMIF
 
Can the criteria be set using cell formatting information; as an example I'd
like to add all value of all cells with red background color.

John Mansfield

Pappey,

You can sum a range by color by using a VBA function. This site provides
the code:

http://www.erlandsendata.no/english/...saddsumbycolor

----
Regards,
John Mansfield
http://www.pdbook.com

"Pappey" wrote:

Can the criteria be set using cell formatting information; as an example I'd
like to add all value of all cells with red background color.


Littlebird

Surely a macro is not necessary. Can't you use a formula which uses something
for background colour don't know what ! Isn't it true that using a lot of
macros causes computer breakdown ?

SAM

"John Mansfield" wrote:

Pappey,

You can sum a range by color by using a VBA function. This site provides
the code:

http://www.erlandsendata.no/english/...saddsumbycolor

----
Regards,
John Mansfield
http://www.pdbook.com

"Pappey" wrote:

Can the criteria be set using cell formatting information; as an example I'd
like to add all value of all cells with red background color.


Cesar Zapata


hey que pasa,


Properly written macros wont break down your PC but if you can use a
formula instead of a macro then formula is the way to go. In this case
Excel does not have a function to detect the font / background color.
The function the John provided should do that job.

Cesar



All times are GMT +1. The time now is 11:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com