Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping: Search Range in Multiple Selected Worksheets, Copy/Paste
Thanks to everyone for all the help before. I have one more question. I
have a macro that creates several dozen worksheets (all with publicly traded stock information). The worksheets dont exist until I query finance.yahoo.com and import all information from this web site. When the macro is executed, a spreadsheet is created for each stock, and the data is imported to each relevant sheet. Now I get more data than I need, so I am trying to figure out a way to reference each sheet (it has to be a loop) and identify, or find, certain strings, such as "Forward P/E (1 yr):", "PEG Ratio (5 yr expected):", "Annual EPS Est (Aug-07):" (the (Aug-07) part is certain to create obvious problems unless I can set this up to search for "ESP" within the string), etc. Then I have to find the value to the right of this string (perhaps offset (0 ,1)). Something like...search...ok "Forward P/E (1 yr):" is in column D and row 1 (it may not always be here, but it will be close; thats why I have to search for it)...shift right one cell...copy/paste that value onto a sheet called "Summary Sheet" in cell c3, then loop back and get the next "Forward P/E (1 yr):" in the next sheet. When this column is done, start looking for "PEG Ratio (5 yr expected):", "Annual EPS Est (Aug-07):", the corresponding value, etc. Any ideas? Some help would be much appreciated. When I have a full working model, I will post my code here for the benefit of others Regards, RyGuy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to copy & paste-special-values data to selected worksheets | Excel Discussion (Misc queries) | |||
search, copy and paste through multiple sheets | Excel Discussion (Misc queries) | |||
Copy range from one worksheet and paste to multiple worksheets | Excel Discussion (Misc queries) | |||
copy/paste selected worksheets | Excel Programming | |||
How to Copy & Paste selected Range in Excel (MFC) | Excel Programming |