+ Reply to Thread
Results 1 to 3 of 3

Match dates and prices

Hybrid View

Guest Match dates and prices 04-20-2006, 08:40 AM
Guest Re: Match dates and prices 04-20-2006, 08:50 AM
Guest Re: Match dates and prices 04-20-2006, 09:15 AM
  1. #1
    daniroy@gmail.com
    Guest

    Match dates and prices

    thanks in advance for anybody that could provide me with help on this
    part of code that is - I guess - possibly very easy to write but I have
    no idea of how to sort it out.

    I have a column A containing product names. Only two products exist and
    they are irregularely sorted as
    Column A
    Product A
    Product B
    Product B
    Product A
    Product B
    Product A
    and so on
    the lenght of this column will be irregular from day to day. It can be
    7 lines today, 12 tomorrow, 100 the day after.

    On column B, I have dates which are associated with products. Dates
    would always be in ascending order, from the most recent to the most
    distant from now on, whatever the sorting of Products in column A. It
    would thus look as:
    Column A Column B
    Product A 21/04/2006
    Product B 19/05/2006
    Product B 22/06/2006
    Product A 11/07/2006
    Product B 12/08/2006
    Product A 05/09/2006
    and so on

    On column P, I would have a serie of dates, sorted by ascending order,
    from the most recent to the most distant from now on, all corresponding
    to product B dates, such as
    Column P
    19/05/2006
    22/06/2006
    12/08/2006
    and possibly more, if Column A includes more "Product B" lines.
    Column R associate the prices of "Products B" at a certain point in
    time ie Column P
    Column P Column R
    19/05/2006 250
    22/06/2006 180
    12/08/2006 370
    and so on, function of the number of "product B" present in Column
    A.
    On this basis, what I am aiming to do, is to match in Column C the
    price existing in Column R for the "Product B" from Column A with
    corresponding Column B date, or for instance

    Column A Column B Column C
    Product A 21/04/2006
    Product B 19/05/2006 250
    Product B 22/06/2006 180
    Product A 11/07/2006
    Product B 12/08/2006 370
    Product A 05/09/2006

    I could implement a vlookup in Column C, linked to columns P, R. But
    user would crash the formula for sure. I thus need matching to be made
    in VB code and "pushed" into Column C. Moreover, a vlookup would
    not sort the fact that columns A, B can be made of 10 or 1000 lines,
    from one day to the other.
    I am, obviously, unable to code this. I thus would be extremely
    thankful to any help that anybody can provide...

    I wish you all the best
    Daniel


  2. #2
    Don Guillett
    Guest

    Re: Match dates and prices

    If? I understand you properly you might like to look in vba help index for
    FINDNEXT.
    using c.offset(0,3)

    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    <daniroy@gmail.com> wrote in message
    news:1145536418.001895.86040@i39g2000cwa.googlegroups.com...
    > thanks in advance for anybody that could provide me with help on this
    > part of code that is - I guess - possibly very easy to write but I have
    > no idea of how to sort it out.
    >
    > I have a column A containing product names. Only two products exist and
    > they are irregularely sorted as
    > Column A
    > Product A
    > Product B
    > Product B
    > Product A
    > Product B
    > Product A
    > and so on
    > the lenght of this column will be irregular from day to day. It can be
    > 7 lines today, 12 tomorrow, 100 the day after.
    >
    > On column B, I have dates which are associated with products. Dates
    > would always be in ascending order, from the most recent to the most
    > distant from now on, whatever the sorting of Products in column A. It
    > would thus look as:
    > Column A Column B
    > Product A 21/04/2006
    > Product B 19/05/2006
    > Product B 22/06/2006
    > Product A 11/07/2006
    > Product B 12/08/2006
    > Product A 05/09/2006
    > and so on
    >
    > On column P, I would have a serie of dates, sorted by ascending order,
    > from the most recent to the most distant from now on, all corresponding
    > to product B dates, such as
    > Column P
    > 19/05/2006
    > 22/06/2006
    > 12/08/2006
    > and possibly more, if Column A includes more "Product B" lines.
    > Column R associate the prices of "Products B" at a certain point in
    > time ie Column P
    > Column P Column R
    > 19/05/2006 250
    > 22/06/2006 180
    > 12/08/2006 370
    > and so on, function of the number of "product B" present in Column
    > A.
    > On this basis, what I am aiming to do, is to match in Column C the
    > price existing in Column R for the "Product B" from Column A with
    > corresponding Column B date, or for instance
    >
    > Column A Column B Column C
    > Product A 21/04/2006
    > Product B 19/05/2006 250
    > Product B 22/06/2006 180
    > Product A 11/07/2006
    > Product B 12/08/2006 370
    > Product A 05/09/2006
    >
    > I could implement a vlookup in Column C, linked to columns P, R. But
    > user would crash the formula for sure. I thus need matching to be made
    > in VB code and "pushed" into Column C. Moreover, a vlookup would
    > not sort the fact that columns A, B can be made of 10 or 1000 lines,
    > from one day to the other.
    > I am, obviously, unable to code this. I thus would be extremely
    > thankful to any help that anybody can provide...
    >
    > I wish you all the best
    > Daniel
    >




  3. #3
    daniroy@gmail.com
    Guest

    Re: Match dates and prices

    I am sorry but I am not sure to understand how it can help me ...
    probably my fault to be fair ... I am not really seeing how to
    implement this. Thanks again for any help ...


+ 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