View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default Combination...SumProduct, Index, Match?

Assumptions:
Tier Table is defined as TblTier
The first row of the Tier Table is defined as Tier
The Customer's Tier column is defined as CustTier
I have your table for customers beginning in row 7, with customer 1 in cell
A8, etc.

The formula in F8: (rate)
=VLOOKUP(CustTier,TblTier,MATCH(IF(C8<"","Paper1" ,"")&IF(D8<"","Paper2","")&IF(E8<"","Paper3","") ,Tier,0),FALSE)

The formula in G8:
=SUM(C8:E8)*F8

This also assumes that each customer will only have 1 possibility in either
Paper1, Paper2, or Paper3. Multiple entries break it.

Hope this helps.
--
John C


"Monte" wrote:

Hello!
Life was simple, then we offered multiple rates for the same paper.
Your assistance with the following scenario is greatly appreciated.
-Monte

Rate Chart
Tier....Paper1...Paper2...Paper3
..1.......$1.00.....$5.00.....$7.00
..2.......$2.00.....$5.00.....$7.00
..3.......$3.00.....$5.00.....$7.00
..4.......$4.00.....$5.00.....$7.00

Customer Accounts
Customer.....Tier.....Paper1.....Paper2.....Paper3 .....Rate.....Due
Customer1......1..........1....................... ................$1.00....$1.00
Customer2......2..........4....................... ................$2.00....$8.00
Customer3......3..........X....................... ................$3.00....$0.00
Customer4......1.........................1........ ................$5.00....$5.00
Customer5......4.................................. ......X.........$7.00....$0.00

When the customer subscribes to paper1, use the customers tier number to
find the corresponding rate on the rate chart. Do this even if the customer
is not currently receiving the paper (marked with an x).

If the customer subscribes to paper2 or paper3, regardless of the customers
tier number, the rate is always the same.

Last, for each customer, the amount due is always the quantity of each paper
multiplied by the rate, except when the customer is not receiving the paper
(marked with an x), then its zero.