Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm building a test matrix in Excel and for some reason the macro that I am writing is having a problem reading the cells in the range that I pass to the functions.
The test matrix is a workbook comprised of many sheets (about 20 + to date) and contains the results pass or fail for each test case. However instead of counting the number of times the word pass or fail appears, the macro reads each cell as blank, which is incorrect.
Here is the basic code that is used in each function:
Function GetPass(TR As Range) As Integer
Dim x As Integer
'Initialization of variablesx = 0
For Each Cell In TR
If Text = "pass" Then
x = x + 1
GetPass = x
End If
Next Cell
'Loops through each cell in the range
'The If checks to see if the contents are the word "pass"
'Returns the number of times the word "pass" is found as the numeric value of the functionEnd Function

BEST BET FOR THAT IS AN EXCEL NEWS GROUP INSTEAD OF A WINDOWS 2000 NEWS GROUP. TRY
http://www.j-walk.com/ss/help/newsgrp.htm

![]() |
IE6 Network Roll Out
|
MSoffice Word Question
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |