Hi
I bought couple of VB book and and also bought programing in excel, but I just can't learn by myself, I hate it. It seems like I learn it from hands on training. Any way, I wanted to know some code for the following example, if you have the time I would appreciate it:
Lets say I have 2 columns and have the following data:
A B
2 3
1 4
How can I write different loop statement to do the following:
Add (Row 1 column A + Row 1 Column B, 2+3) in Row 1 column C, result = 5, and keep doing it until you reach row 1000 using
Do While
Do until
With
For each
For next
or using counter.
Question 2. When I record a macro and then run it, sometimes it fails to run because the cursor was not in a particular cell. What code do I have to write so that no matter where the cursor is the macro will run.
Thanks
I bought couple of VB book and and also bought programing in excel, but I just can't learn by myself, I hate it. It seems like I learn it from hands on training. Any way, I wanted to know some code for the following example, if you have the time I would appreciate it:
Lets say I have 2 columns and have the following data:
A B
2 3
1 4
How can I write different loop statement to do the following:
Add (Row 1 column A + Row 1 Column B, 2+3) in Row 1 column C, result = 5, and keep doing it until you reach row 1000 using
Do While
Do until
With
For each
For next
or using counter.
Question 2. When I record a macro and then run it, sometimes it fails to run because the cursor was not in a particular cell. What code do I have to write so that no matter where the cursor is the macro will run.
Thanks