Vlookup formula

alexaa

New Member
Joined
Apr 3, 2012
Messages
13
I need help on how to do a vlookup formula.. The question is to add a column named Water Bill to the table, and then enter a formula to calculate the water bill based on the following rules: The billing rate varies based on the type of customer (Cust Type column). The billing rate is $3, $2, or $1.50 per thousand gallons billed, depending on the customer type (see the lookup table in cells B2:C5 of the Billing Rate worksheet). For example, a commercial customer using 75,000 gallons has a water bill of $225 (75 x $3), whereas a government customer using 100,000 gallons pays $150 (100x $1.50). A commercial customer using 15,000 gallons has a water bill of $0n (see Gal Used rule in question 3).
 
Could you email me please? A lot easier than jumping back and forth. Thanks!
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I need help on how to do a vlookup formula.. The question is to add a column named Water Bill to the table, and then enter a formula to calculate the water bill based on the following rules: The billing rate varies based on the type of customer (Cust Type column). The billing rate is $3, $2, or $1.50 per thousand gallons billed, depending on the customer type (see the lookup table in cells B2:C5 of the Billing Rate worksheet). For example, a commercial customer using 75,000 gallons has a water bill of $225 (75 x $3), whereas a government customer using 100,000 gallons pays $150 (100x $1.50). A commercial customer using 15,000 gallons has a water bill of $0n (see Gal Used rule in question 3).
Excel Workbook
ABCDEFG
1CustomerTypeWater UsedWater billSheet 2
2Acommercial75000225TypeRate
3Bgovernment100000150government$1.50
4Ccommercial1500045commercial$3.00
Sheet1
Excel 2007
Cell Formulas
RangeFormula
D2=VLOOKUP(B2,$F$3:$G$4,2,0)*C2/1000
D3=VLOOKUP(B3,$F$3:$G$4,2,0)*C3/1000
D4=VLOOKUP(B4,$F$3:$G$4,2,0)*C4/1000
 
Upvote 0
yes, thank you so much; also how do i highlight only the top 15 % of the Total bill amounts with a yellow background color. Filter the table so that only the top 15 percent are displayed. Sort the filtered table by largest to smallest

Put an auto filter across the top row, and sort descending on whichever column you'd like. For the highlighting, use conditional formatting. Highlight that column, then go to Formatting>Conditional formatting.

For more details look at this thread.
 
Upvote 0
Hi,
I need help with this same problem?
Did you ever figure out the correct formula??
thanks
Hello,

You can try this formula:

=VLOOKUP(C2,$H$2:$I$4,2,FALSE)*B2

Where C2 contains the CUST TYPE, range H2:I4 contain the legend (Commercial = 3, Government = 1.5, etc) 2 = the value to return, and B2 the water used (in thousand gallons).

Good luck!
 
Upvote 0
Hello,

You can try this formula:

=VLOOKUP(C2,$H$2:$I$4,2,FALSE)*B2

Where C2 contains the CUST TYPE, range H2:I4 contain the legend (Commercial = 3, Government = 1.5, etc) 2 = the value to return, and B2 the water used (in thousand gallons).
There is another speadsheet with a vertical cololum.
I just dont know how to divide by 1000.

Can you provide us with some details?
 
Upvote 0
Hello,

You can try this formula:

=VLOOKUP(C2,$H$2:$I$4,2,FALSE)*B2

Where C2 contains the CUST TYPE, range H2:I4 contain the legend (Commercial = 3, Government = 1.5, etc) 2 = the value to return, and B2 the water used (in thousand gallons).
There is another speadsheet with a vertical cololum.
I just dont know how to divide by 1000.
Like this...

=VLOOKUP(C2,$H$2:$I$4,2,0)*B2/1000
 
Upvote 0

Forum statistics

Threads
1,216,562
Messages
6,131,422
Members
449,651
Latest member
Jacobs22

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