Adding by Font Color

  • Thread starter Thread starter onyx4813
  • Start date Start date
O

onyx4813

OK I went into cpearson.com and copied the syntax for adding font by
color in excel using vb
I tried to enter it into a macro but i think i'm screwing up
i went to the website with the instructions but i'm a moron and i'm not
getting this
am i suppose to be changing the syntax somehow
or am i saving or entering the macro wrong
all i know is when i enter the formula =sumbycolor(a1:e12,3,false) i'm
either getting value? or a zero
:(

please help me
 
onyx4813, if you want to add the font colors change false to true like this
=SUMBYCOLOR(A1:A10,3,TRUE) this will sum A1:A10 for the fonts that are red.

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
If you installed the function in your personal.xls then
you would implement the function as
=personal.xls!sumbycolor(a1:e12,3,false)

I have some examples using Chip's functions.
http://www.mvps.org/dmcritchie/excel/colors.htm#cpcolorsx

I suspect that you did in fact install in your personal.xls workbook,
as suggested, if you are getting #VALUE! error.
The colorindex of 3 is for Red, and the False indicates you want
to count based on Interior color (as opposed to Font color).

To verify that you have the User Defined Function in your
personal.xls you might try the following from Excel:
1) Alt+F11 to get you to the Visual Basic Editor
2) Ctrl+R for the object browser (also on View menu)
3) you should see personal.xls there if you created one
4) Expand the personal.xls if not already expanded [+]
5) Under modules you will have a list of modules beginning at module1
since you are having problems, you probably only have module1 so far
the code should be there, double click on module1 and/or other modules.

If the code is in under "Class Modules" in Class1 then you installed
in the wrong place.

It is very hard to follow a conversation when you do not stick to the
thread you were in, which was:
http://google.com/[email protected]

You might read about newsgroups and searching newsgroups at
http://www.mvps.org/dmcritchie/excel/xlnews.htm
Using websites that replicate postings to the web make things very
difficult for everyone who really make an attempt at searching
the web and newsgroups for answers. Google keeps newsgroup
searches very distinct from web page searches, but does not and
cannot weed out such sites as exceltips, excelforum and at least
3 dozen such sites that interfere directly with Excel webpage searching.
 
Back
Top