Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to write a program in excel using visual Basic

Status
Not open for further replies.

sunnyfunghy

Member level 1
Joined
Aug 12, 2008
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,502
Hi everyone,

how to write a program below in excel using visual Basic

1. Write a program to calculate
(i) the total number of characters (excluding punctuation marks) in each cell in an Excel file
(ii) the number of characters before the first occurrence of ","

For example:
ABCDE,FGH.

Answer
1i) 8
2)5

Many thanks^^
 

qieda

Full Member level 3
Joined
Aug 15, 2006
Messages
150
Helped
47
Reputation
94
Reaction score
47
Trophy points
1,308
Activity points
2,174
do you want to use VBasic, or would it be ok to use excel functions

e.g.
if your string is in cell A1
=LEN(A1) gives the length of 8
=SEARCH(",",A1)-1 gives the length of 5

regards
 

sunnyfunghy

Member level 1
Joined
Aug 12, 2008
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,502
do you want to use VBasic, or would it be ok to use excel functions

e.g.
if your string is in cell A1
=LEN(A1) gives the length of 8
=SEARCH(",",A1)-1 gives the length of 5

regards

Thank you
but if like this, and I want to do in visual Basic
e.g. abcde,bcdef,jkl.

Total: 13 before "." and excluding "."
Thanks a lot^^

---------- Post added at 11:09 ---------- Previous post was at 10:09 ----------

Besides, I also discover that when "=SEARCH(",",A1)-1" this command code uses to count Chinese word, there is an error. So how to change?

Many thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top