ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup Postage Price [min & max weight] (https://www.excelbanter.com/excel-worksheet-functions/70252-lookup-postage-price-%5Bmin-max-weight%5D.html)

iwgunter

Lookup Postage Price [min & max weight]
 

I've got a spreadsheet with two worksheets - products & postage - In the
products sheet I have a column containing the weight of the item and in
the postage sheet I have 3 colums, a from weight, a to weight and the
postage cost.

I'm no good with Excel forumlas but can write PHP ones, so I need
something like this translated into Excel if possible.


Code:
--------------------
echo postage(C1:C24) WHERE products(H2)=postage(A1:A24) AND products(H2)<=postage(B1:B24)
--------------------


So that means show the price in postage sheet column C where the weight
in products column H is greater than or equal to the postage weight
column A and less than or equal to postage weight column B

Cheers guys [and gals]

Ian


--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441
View this thread: http://www.excelforum.com/showthread...hreadid=509942


DaveO

Lookup Postage Price [min & max weight]
 
You need to use a SUMPRODUCT function.

My examples assumes Column A assumes lower weight, Column B upper weight and
Column C the price. In cell A12 you type the weight and will then give you
your answer.

=SUMPRODUCT(--(A1:A10<=A12), --(B1:B10=A12), (C1:C10))

HTH.

"iwgunter" wrote:


I've got a spreadsheet with two worksheets - products & postage - In the
products sheet I have a column containing the weight of the item and in
the postage sheet I have 3 colums, a from weight, a to weight and the
postage cost.

I'm no good with Excel forumlas but can write PHP ones, so I need
something like this translated into Excel if possible.


Code:
--------------------
echo postage(C1:C24) WHERE products(H2)=postage(A1:A24) AND products(H2)<=postage(B1:B24)
--------------------


So that means show the price in postage sheet column C where the weight
in products column H is greater than or equal to the postage weight
column A and less than or equal to postage weight column B

Cheers guys [and gals]

Ian


--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441
View this thread: http://www.excelforum.com/showthread...hreadid=509942




All times are GMT +1. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com