Hi all
I have a problem.
I want to write a program using VB in Excel.
I put a txtbox and a cmdbutton in my worksheet. When I click on cmdButton, I
want my program to do this:
See if the word in the text box, exists in column "A" or not. If it exists
in column A, then its related number in column B must get 1 grade higher
than before, but if the word doesn't exist in column "A", add the word to
the end of the column.
For example if these are my columns:
A B C
1 Name No
2 apple 10
4 banana 2
5 Lemon 15
6
Now if the word in txtbox is "Apple" , then the worksheet must be like this:
A B C
1 Name No
2 apple 11
4 banana 2
5 Lemon 15
6
But if the word is "Cherry", the worksheet must be changed into this:
A B C
1 Name No
2 apple 10
4 banana 2
5 Lemon 15
6 Cherry 1
Hope its clear. How can I do this? I don't know how to search for a word in
a column or how to find the position of end of a column.
Any help is appreciated.
Thank you
Javad
Bookmarks