Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carriage Returns

Status
Not open for further replies.

fatz

MIS
Feb 5, 2004
10
0
0
US
Help-

I have a macro to count rows in an excel spreadsheet. The code i am using is

If x <> &quot;&quot; then

and it keeps counting rows with out visible text.

Is there code to only count visible text or eliminate carriage returns.

Thanks for the help!

fatz
 
Hello Fatz,

Intrinsic constants vbCr, vbLf, vbCrLf, vbNullString are the types of things you are asking about. Not sure what you are trying to do, but check out the SpecialCells property in help. It can count blank rows, data rows, etc. Good Luck!

Have a great day!

j2consulting@yahoo.com
 
Have you tried something like this ?
Code:
If Trim(x) > &quot; &quot; Then

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top