Macro to to get values for specific date and copy to cells

L

LLr

Hello,
This is a follow up post to "Macro better solution than cell formula with
date?" Bob, thank you, your code did exactly what I asked for but I have
found a need for more processes and my modifications to your code resulted
in errors and unexpected results. In the example below Col B is the current
day stock price (from ESQuotesdotcom). Date Bought, C2,3,4, are filled by
user. D and F are, except D1 and F1, cell formulas to calculate the day
bought plus 1. E and G are empty. I have twenty pairs of Date/Price
columns, so in this example, AP AQ should be the last 2 Cols., and 50 total
Rows available for future entries. The actual Date/Price Cols in my
worksheet start on AL and end on BW. Row 1 has the current day and
subsequent days already filled in D1,F1 and on and are cell formulas
calculated off of a base date entered by the user, say in cell C1. The
worksheet would be opened and updated daily. What I have tried to get a
macro to do (failed miserably) is - - If the day the worksheet is opened
is the current day (D1, F1, H1, etc.), get the values in Col B and place
them in the proper cells in Col E and continue this same process when opened
on subsequent days. Hope this is not too much info. Seems like a simple
process but beyond my capabilites. Open to suggestions and definately to
solutions! Thanks for any responses in advance.




A B C D
E F G
Symbol Price Date Date Bought Plus 1
Day
Bought Date
Price Date Price

Row 1 Current Day (4/22/05) 4/23/05
4/24/05

Row 2 EFFI $16 4/12/05 4/13/05
4/14/05

Row 3 SHOE $7 4/2/05 4/4/05
4/5/05

Row 4 MSFT $89 4/19/05 4/20/05
4/21/05
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top