Question : How can I change the formula of a cell based on the string value in a dropdown?

Here is what I am looking to do. I have 15 client types(client type1, client type 2,...,client type 15). I have formulas that calculates total billing based on the client type. There are only 8 of these formulas which means some of the client types share the same formula. Here is what a formula might look like:

(C17-(C17/B17*495))/1.2

All the formulas are essentially the same with the exception of one value - the divisor at the end. In the example above it is the 1.2

What I want to do is put my client types in a drop down list. When a client type is chosen I would like to have the "billing total" cell changed based on the corresponding formula.

Nested IF statements won't work due to the limitations Excel imposes. Besides, I don't think this is the most efficient way to do this either so please no crazy examples of nested IF statements. Ideally i would like this to be as simple as possible.

I would also like to lock the drop down and formula cells so they can't be accidentally changed.

Answer : How can I change the formula of a cell based on the string value in a dropdown?

You could try a formula like this:

=(C17-(C17/B17*495))/VLOOKUP(H1, I1:J5, 2)

The VLOOKUP requires some explaining.

H1 is the location of the dropdown box.  
I1:J5 is a lookup table you need to create. It could be in hidden cells, or it could be on another sheet.  In this case, I said that column I is the value of H1 that you're looking up.  Column J has the number you're dividing by (such as 1.2).  

If you can re-create that, then this may do what you need.
Random Solutions  
 
programming4us programming4us