D
Dave Johnson
My wife owns a t-shirt company and I'm trying to help her write a
spreadsheet that will calculate price per shirt printed using a vlookup
formula.
The table has 10 rows of quantities in the left column and 6 colums of
colors 1-6 across the top row. As long as I only use one vlookup (for a one
sided print job) it works perfectly. Where I'm getting stuck is when I try
to add a second vlookup for the number of colors to be printed on the back
of each shirt.
As long as I have a quantity of 1 to 6 it works fine. It's when the value is
0 or blank that something is going very wrong. The result is very high, $106
per shirt when it should be $3.30.
How do I get my formula to ignore the second vlookup if the value is 0?
=((VLOOKUP(B12,D6:J16,B9+1)+(B16/B12)+B8)+VLOOKUP(B12,D6:J16,B10+1))/B6
1 2 3 4 5 6
1 20.00 40.00 60.00 100.00 125.00 150.00
12 5.00 6.00 7.00 8.00 9.00 10.00
24 2.00 2.50 3.00 3.50 4.00 4.50
48 0.95 1.20 1.50 1.80 2.10 2.40
72 0.85 1.15 1.35 1.55 1.75 1.90
144 0.75 1.05 1.25 1.40 1.55 1.75
288 0.65 1.00 1.20 1.35 1.50 1.60
576 0.50 0.90 1.10 1.25 1.40 1.50
1200 0.45 0.55 0.65 0.75 0.85 0.95
3000 0.40 0.45 0.55 0.65 0.75 0.85
Thanks for any help with this.
Dave
spreadsheet that will calculate price per shirt printed using a vlookup
formula.
The table has 10 rows of quantities in the left column and 6 colums of
colors 1-6 across the top row. As long as I only use one vlookup (for a one
sided print job) it works perfectly. Where I'm getting stuck is when I try
to add a second vlookup for the number of colors to be printed on the back
of each shirt.
As long as I have a quantity of 1 to 6 it works fine. It's when the value is
0 or blank that something is going very wrong. The result is very high, $106
per shirt when it should be $3.30.
How do I get my formula to ignore the second vlookup if the value is 0?
=((VLOOKUP(B12,D6:J16,B9+1)+(B16/B12)+B8)+VLOOKUP(B12,D6:J16,B10+1))/B6
1 2 3 4 5 6
1 20.00 40.00 60.00 100.00 125.00 150.00
12 5.00 6.00 7.00 8.00 9.00 10.00
24 2.00 2.50 3.00 3.50 4.00 4.50
48 0.95 1.20 1.50 1.80 2.10 2.40
72 0.85 1.15 1.35 1.55 1.75 1.90
144 0.75 1.05 1.25 1.40 1.55 1.75
288 0.65 1.00 1.20 1.35 1.50 1.60
576 0.50 0.90 1.10 1.25 1.40 1.50
1200 0.45 0.55 0.65 0.75 0.85 0.95
3000 0.40 0.45 0.55 0.65 0.75 0.85
Thanks for any help with this.
Dave