If..Then Statement Problem

D

DebiH

I have figured out the first part of this problem, but can't seem to ge
any farther. Here's what I need

Basic synopsis: each client has a different percentage to which thei
invoices are multiplied, i.e., Column A is the client name, Column B i
the total invoice amount, Column C is the percentage of the invoice.
If Column A = "AAA" then the percentage is 50%, so whatever Column
is, Column C will calculate at 50%. If Column A = "BBB" then th
percentage is 75%, and whatever is inColumn B will calculate int
Column C at 75%

I have gotten as far as if Column A = "AAA" then the percentage i
50%, but if I put anything other than AAA, Column C reads "FALSE".

I hope I've explained this clearly.

Thanks in advance

Debi H
 
J

JE McGimpsey

One way:

Put your client name and percentage in a table, either elsewhere on your
sheet or on a different sheet, say:

A B
1 Client Percentage
2 AAA 50%
3 BBB 75%
....
27 ZZZ 110%

You can name the table if you'd like (say "client_table")

In your original sheet, enter

A2: BBB
B2: <amount>
C2: = B2 * VLOOKUP(A2, Sheet2!A:B, 2, FALSE)
which will return 75%.

If you name the table, the syntax would be:

C2: = B2 * VLOOKUP(A2, client_table, 2, FALSE)
 
D

Don Guillett

You can use select case or a simple if
if col a="aaa" then x=.5
if col b="bbb"then x=.75
col c=colB*x
 
D

DebiH

I will try both and see what I can come up with. If anyone else ha
ideas, I'm open! I'm sure there are 100 ways to do this
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top