Conditional Vlookup statement?

jeff007

New Member
Joined
Jul 7, 2006
Messages
27
I have a table I use for the main order entry sheet,I have a separate table for products which has 7 column headers
Code Mfg Description Cost Price FlatRateShip CostDate, my purchase orders and sales receipt forms
are programmed with vlookup statements that key off the order number from the main order entry sheet to populate themselves.
The problem I am having is when manufacturers raise their prices during the course of the year how do I create a statement that
will populate my sales receipt and purchase order forms with the most current price.

The following is the current statement in my invoice to insert the price =IF(B5=0,0,VLOOKUP(B5,'P3'!$A$2:$G$9995,5,FALSE))

I would like to know how to write a statement that would return the price of the product from an item this is the most current price
as the column headers shown above suggest the last column CostDate is the date when this price became effective, how do I get Excel
to look at the code number and if there are more than one of the same code number select the price of the code number that has a CostDate
that is equal to or later than the invoice date. My invoice date is located in cell G3.

Thank you for any light you may be able to shed on this problem.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Post removed -- let me know about possibility of 1+ prices per month per code.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top