LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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

 
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
Formula to match different ranges of time and prices santiag_dl Excel Worksheet Functions 0 January 11th 12 02:18 AM
How to match 2 prices Gmata Excel Worksheet Functions 2 September 14th 08 05:38 AM
EXCEL - formula for linking dates and prices ekonomija Excel Worksheet Functions 0 November 30th 07 01:58 PM
Using MATCH with dates [email protected] Excel Worksheet Functions 1 July 8th 06 01:32 AM
Use a multiplier to change List Prices to Net prices Dangada Excel Worksheet Functions 1 July 6th 05 06:31 AM


All times are GMT +1. The time now is 06:51 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"