I am trying to enter the following formula but I am coming up blank.

Ok, I have excel 2007.

I created a purchase order. On the purchase order I am trying to calculate multiple sales tax possibilities depending on which state I place in the State cell.

The 3 cells I am working with are: State "C5", Sub Total "D5", and Sales Tax "E5".

When I place "CA" in "C5" I want "E5" to calculate "D5" * 9.75%,
when I place "LA" in "C5" I want "E5" to calculate "D5" * 8.75%,
and when I place any other initials besides those 2 above in "C5" I want "E5" to calculate "D5" * 4.00%

Can someone please walk me through that particular formula?

Thank You

Recommended Answers

All 2 Replies

I am trying to enter the following formula but I am coming up blank.

Ok, I have excel 2007.

I created a purchase order. On the purchase order I am trying to calculate multiple sales tax possibilities depending on which state I place in the State cell.

The 3 cells I am working with are: State "C5", Sub Total "D5", and Sales Tax "E5".

When I place "CA" in "C5" I want "E5" to calculate "D5" * 9.75%,
when I place "LA" in "C5" I want "E5" to calculate "D5" * 8.75%,
and when I place any other initials besides those 2 above in "C5" I want "E5" to calculate "D5" * 4.00%

Can someone please walk me through that particular formula?

Thank You

Use a Nested IF function. For what you describe above, the solution is:

In E5, type the formula
=IF(C5="CA",D5*9.75%,if(C5="LA",D5*8.75%,D5*4%))

However, if you have a larger range of states and values, referring to a VLOOKUP table for rates is a better option.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.