A lookup formula should accomplish what you're asking. Repost (stay in this thread) with the exact layout of the data in your workbook (worksheet names, columns, rows, etc. involved) along with a small sample and expected results.
It is a litle bit complicated, but I'll try to explain
It's all about discount (%)
I've got 15 conditions.
Cell D1 is costumer
Range("B15:B39) are diferent Codes of products
Now let's start
there are letters that specify tipe of article:
and tipe of costumer:
All together 15 conditions.
Every product has a diferent discount depending of costumer.
Until now 25000 products, and 700 costumers.
Or to resolve problem with a macro?
Something based on folowing:
Dim fn As WorksheetFunction, LookupVal As Variant
Set fn = WorksheetFunction
On Error Resume Next
If fn.VLookup(Sheets("Radno").Range("B15"), Sheets("Šifre").Range("b:g"), 6, False)="P" And
If fn.VLookup(Sheets("Radno").Range("D1"), Sheets("Kupci").Range("b:m"), 12, False) = "I" Then
Sheets("Radno").Range("F15") = Sheets("KOEFICIENTI").Range("D12")