ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Character Count? (https://www.excelbanter.com/excel-programming/386182-re-character-count.html)

Tom Ogilvy

Character Count?
 
Dim s as String, s1 as String
Dim i as Long
s = Textboxes("Text Box 1").Text
s1 = ""
bCapture = False
for i = 1 to len(s)
if mid(s,i,1) = " " then bCapture = Not bCapture
if bCapture then
s1 = s1 & mid(s,i,1)
end if
Next

Range("D1") = s1

Replace the " " with the whatever a Calc Character is.

--
Regards,
Tom Ogilvy


"Benz" wrote:

I have no idea where to start here. In a text box ... Is there a way to use
character count (or anything) to count characters upto point and after to
help later capture that sting of text to place in a file?

Example: Text box contains "There are 78,785 parts available" then the user
types (A- Calc character spacing upto point) "As of 1/1/07 there are 60,455
parts availble" (B- Calc character spacing at this point) Then in cell D1 it
pastes the text that is between charater spaces A-B.

Any ideas? Even possible?

Thank you to anyone that helps!

~Ben Z.



All times are GMT +1. The time now is 08:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com