+ Reply to Thread
Results 1 to 2 of 2

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

  1. #1
    LLr
    Guest

    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. #2
    Patrick Molloy
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1