How to increment column values in VB Macro?

WildFire

New Member
Joined
Jun 24, 2008
Messages
3
I wrote a excel macro which basically does a find and based on the resulting cell copy some more values.

Code:
 Example   
A10                     B10     C10     D10      E10     F10  
Earning Per Share     -0.42    0.04    3.71    0.04    2.86
My macro should find the cell where "Earning Per Share" matches and then copy the following 5 cell values.

In the example A10 is found and should copy B10 C10 D10 E10 and F10.

Catch here is that my web query doesn't have the text in same A10, some times in C20 or B18 etc..

So I'm looking for a way to increment Column values in my macro so that the values are copied after the specified text is found. Appreciate any help.
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
If i wasn't clear, i need help on incrementing the column values alone from say F G H and so on in a loop to copy values
 
Upvote 0

Forum statistics

Threads
1,215,695
Messages
6,126,263
Members
449,307
Latest member
Andile

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top