Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
LLr LLr is offline
external usenet poster
 
Posts: 3
Default Macro to to get values for specific date and copy to cells

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Macro to to get values for specific date and copy to cells

Have you thought about using MS Access? would be so much easier

"LLr" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif certain values on specific date Stevcon Excel Worksheet Functions 1 October 30th 09 11:23 AM
Count zero values before specific date lesg46 Excel Worksheet Functions 6 January 24th 09 11:05 PM
Macro to find matching date and copy values to another sheet Tiger Excel Discussion (Misc queries) 3 August 13th 07 01:45 PM
Macro to copy specific cells from one workbook to another [email protected] Excel Discussion (Misc queries) 4 June 9th 06 04:32 PM
Automatically Copy Specific Values to a Different Spreadsheet? Matt Excel Discussion (Misc queries) 4 May 17th 06 11:39 PM


All times are GMT +1. The time now is 05:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"