View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
durex[_6_] durex[_6_] is offline
external usenet poster
 
Posts: 1
Default Sum of Len(string) for an entire row


Excellent! Thanks so much! I was actually looking for the total length
of all strings in a particular row, but that got me in the direction I
needed! Just made a minor modification and it worked like a charm.


Code:
--------------------
Public Function AddRow(ByVal Row_Range As String) As Variant
Dim Total
Dim X
For Each X In ActiveSheet.Range(Row_Range)
Total = Total + Len(X.Value)
Next X
AddRow = Total
End Function
--------------------


Just Changed the "Val" to "Len"

Thanks again for the super fast reply!


--
durex
------------------------------------------------------------------------
durex's Profile: http://www.excelforum.com/member.php...o&userid=27857
View this thread: http://www.excelforum.com/showthread...hreadid=478407