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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Can you post some data and the results you want, this will help us write the code or formula you need.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,749
Members
448,989
Latest member
mariah3

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