Computing.Net > Forums > Windows 2000 > Macro Problems in Excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Macro Problems in Excel

Reply to Message Icon

Name: Retha Williams
Date: October 28, 2002 at 11:15:30 Pacific
OS: Win 2000
CPU/Ram: 256K
Comment:

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 variables

x = 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 function

End Function



Sponsored Link
Ads by Google

Response Number 1
Name: mark usher
Date: October 28, 2002 at 13:49:49 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More


IE6 Network Roll Out MSoffice Word Question



Post Locked

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


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: Macro Problems in Excel

Excel Macro www.computing.net/answers/windows-2000/excel-macro/65675.html

VB Script Macros in Excel www.computing.net/answers/windows-2000/vb-script-macros-in-excel/65764.html

Font Problem in Ms-Office www.computing.net/answers/windows-2000/font-problem-in-msoffice/35344.html