문제

I have 2 user input values. One represents number of users, the other represents license term.

While license term is fixed, e.g., 12 months, 24 months, or 36 months, number of users is in a range. E.g., 1 to 99 users, 100 to 199 users, 200 to 500 users.

I have an excel table that represents prices based on these values. It is setup as follows:

C1     C2     C3     C4     C5

FROM   TO     12M    24M    36M   
1      99     $10    $8     $6
100    199    $9     $7     $4
200    500    $5     $4     $3

Given 2 inputs such as 123 users and 24 months, I need a formula that can return the price in the table (in this case, $7.

Appreciate the help! Thanks

도움이 되었습니까?

해결책

Try this:

=INDEX($C$2:$E$4,COUNTIF($A$2:$A$4,"<"&G2+1),MATCH(H2,$C$1:$E$1,0))

Assumptions:

1. Price table is in range A1:E4
2. Input number of user on column G, and term on column H (12M, 24M, 36M)
3. Put the above formula on column I which is for prices.

다른 팁

You should be able to implement a VLOOKUP for this

I took your data and made a quick Excel Sheet

The formula I used was:

=VLOOKUP(J4,A2:E4,INT(J3/12)+2,TRUE) 

Where J4 is the Value for the number of users (123) J3 is the number of months (24) A2:E4 contain the sample table ( Headers in A1:E1)

The idea here is because your terms are evenly spaced, you can translate them into an index for the column to use (j3/12)+2

Then you set VLOOKUP to use an approximate match for your user range

Please let me know how it goes! Thanks

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top