Help. How can I loop down a list of text references

kanga

New Member
Joined
Oct 8, 2002
Messages
12
Hi all you experts,

Ideas please.

I am trying to look up a series of text references that are part of a longer list, copy some data relative to the found cell, and then loop back to find the next one. If it is numeric it's easy to increment but I can't when it is text that I'm finding.

Any ideas greatly appreciated.

Cheers

Peter
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Can you post some data and the results you want, this will help us write the code or formula you need.
 

kanga

New Member
Joined
Oct 8, 2002
Messages
12
Hi Lasw10,

Thanks for your reply.

I am fairly new at this so I have a few technical things to overcome before I can post the sheets on the board. I can email them if that helps.

However the data is fairly simple. I am getting a download of stock prices for the whole stockmarket each day. This list of stock codes, date, prices, and volume, is received in a csv file which I then parse.

The aim is to then to find and copy data for each stock I am interested in, into another workbook . The second workbook has a worksheet for each stock named after the stock code. I then do calculations on the data for each stock.

The trick is to set up a loop that will look for each stock code (?from a list or range?)and then allow me to copy and insert that data into each worksheet of the second workbook. In other words I think I need a variable that will find a code and then allow me to paste the found data to a sheet of that name in another workbook.

Does that make it clearer ?

Thanks muchly,


Peter
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Firstly - how many lines of data are we talking about? If it's not too many (i.e. under say a 1000) then you can easily use the INDIRECT function in your second workbook (using the stock name).

If it's loads and loads then yes a loop will be preferable...

If you want, mail me some sample data and I will set something up :)
Luke
 

kanga

New Member
Joined
Oct 8, 2002
Messages
12
Hi,

Yes I will chase the indirect command which I haven't used but the list of raw data is about 4300 lines today.

I have emailed a copy of the two sheets to you.

Cheers and thanks

Peter
 

Forum statistics

Threads
1,144,437
Messages
5,724,350
Members
422,545
Latest member
zillafreak

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
Top