Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to make excel simply count red x's?

I just need excel to simply count the red x's in my document. It will
simplify all kinds of work. I have tried:
=SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=3)) , but i keep getting a name
error. When i change SUMPRODUCT to COUNT i dont get the name error but
it shows 0. Are there any simple solutions to this? I dont have the
time to get into visual basic either.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default how to make excel simply count red x's?

That is because you need a ColorIndex function, it doesn't come packaged
with Excel. Go back to the website you got it from, and copy that function
into your workbook.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
ups.com...
I just need excel to simply count the red x's in my document. It will
simplify all kinds of work. I have tried:
=SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=3)) , but i keep getting a name
error. When i change SUMPRODUCT to COUNT i dont get the name error but
it shows 0. Are there any simple solutions to this? I dont have the
time to get into visual basic either.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default how to make excel simply count red x's?

Dear M.C.

You're not going to be able to do it with a Formula (not unless you're
running EXCEL 2007)

You need a Macro:

Sub CountMe()
For Each d in Range("A1:A100")
If d.Interior.ColorIndex = 3 and d.value = "X" then MyCount = MyCount
+1
Next d
msgbox "There are " & MyCount & " Red X's in the range"
End sub

Give that a go (I haven't tested it yet, just wrote it straight in to
the message group)

Greg

wrote:
I just need excel to simply count the red x's in my document. It will
simplify all kinds of work. I have tried:
=SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=3)) , but i keep getting a name
error. When i change SUMPRODUCT to COUNT i dont get the name error but
it shows 0. Are there any simple solutions to this? I dont have the
time to get into visual basic either.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default how to make excel simply count red x's?

Might work if you change interior to font. Interior is background, font is
character.

"Greg Glynn" wrote:

Dear M.C.

You're not going to be able to do it with a Formula (not unless you're
running EXCEL 2007)

You need a Macro:

Sub CountMe()
For Each d in Range("A1:A100")
If d.Interior.ColorIndex = 3 and d.value = "X" then MyCount = MyCount
+1
Next d
msgbox "There are " & MyCount & " Red X's in the range"
End sub

Give that a go (I haven't tested it yet, just wrote it straight in to
the message group)

Greg

wrote:
I just need excel to simply count the red x's in my document. It will
simplify all kinds of work. I have tried:
=SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=3)) , but i keep getting a name
error. When i change SUMPRODUCT to COUNT i dont get the name error but
it shows 0. Are there any simple solutions to this? I dont have the
time to get into visual basic either.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default how to make excel simply count red x's?

In case you have not found a solution, try this one. You will have to re-set
the range parameters to meet your requirements.

Sub redX()
Dim i
A = 0
For Each i In Range("A1:C6").Cells
If i.Value = "x" And i.Font.ColorIndex = 3 Then
A = A + 1
End If
Next i
MsgBox "The count is " & A
End Sub

" wrote:

I just need excel to simply count the red x's in my document. It will
simplify all kinds of work. I have tried:
=SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=3)) , but i keep getting a name
error. When i change SUMPRODUCT to COUNT i dont get the name error but
it shows 0. Are there any simple solutions to this? I dont have the
time to get into visual basic either.


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
How do I simply output Deciles in Excel? iceman30 Excel Discussion (Misc queries) 2 May 17th 23 07:43 PM
How do I make an X appear in a cell by simply double clicking it? robnsd Excel Discussion (Misc queries) 3 February 10th 07 07:21 PM
how to get excel to simply count the number of red x's [email protected] Excel Discussion (Misc queries) 1 November 23rd 06 08:21 AM
is there a way to make dates simply be read as text? tweety127[_17_] Excel Programming 1 June 6th 06 07:44 PM
Excel 2003 Simply Stopped Working Tracie Excel Worksheet Functions 1 March 30th 06 04:08 AM


All times are GMT +1. The time now is 07:55 PM.

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"