|
Answer» My question will hopefully return a relatively simple answer.
I am creating an invoice that has multiple services and prices that need to be on this one spreadsheet. The base price for each service is different which makes it easy to have the totals calculated separately. The current problem I am having is this: The price for mileage is the same for every service so I have only one row for mileage where you can insert the amount and get the price per mile. However, every time I want to only get the total of one service, the minute I type in the mileage to get the price per mile, all the other services add the amount in their totals. How can I isolate that cell to only calculate if it includes the cell that has the price for the service? Is this impossible? Am I going to have to have 7 separate cells that all say "mileage for specific service" in order to get this to stop? I apologize if my question is not clear. I have been working on this for hours. Let me SEE if I can give a better example. (The example is made up, does not have my actual information.)
A1 B1 C1 D1 Delivery of Product(s) less than 100lbs $75.00 (insert quantity) (=C1*B1)
A2 B2 C2 D2 Delivery of Product(s) 100lbs-150lbs $100.00 (insert quantity) (=C2*B2)
A3 B3 C3 D3 Mileage $2.00 (insert quantity) (=C3*B3)
A4 B4 Total of less than 100lbs (=D1+D3)
A5 B5 Total of 100lbs-150lbs (=D2+D3)
Notice that D3 is used for both totals. Therefore, if I put in a quantity for mileage and quantity for first product, the second product would also calculate miles in its total. How can I isolate D3 to only work in the first total if D1 is used and same for the second total? I hope someone can help! Thanks.I'd re-design your spreadsheet but so would anyone else - we all have our own way of doing things and they all vary; it depends on how your thought processes work. Your problem - you need to control your totals calculations in B4 & B5 with an "if" formula. For B4 it would say: =if(D1<"",D1+D3,"") explanation: the formula has three parts,inside the brackets and separated by "commas". The formula says "if the first part is true, do the second part, otherwise do the third part" The first part [D1<""] is aying "if content of D1 is greater than null . . . < means "is greater than" and the quote marks contain a value; in this case "nothing". (E.G. "fred" is quote marks containig the text FRED, "0" is quote marks containing the numeric value ZERO) So the formula is saying "if D1 has a value greater than nothing, add D1 to D3. If D1 does not have any value, do nothing. In B4 use the same formula, substituting D2 for D1 (I haven't used a SS to test it so I hope I've got the logic correct - if I haven't, just juggle the formula )
Quote from: Wyeman on July 04, 2015, 01:27:49 PM < means "is greater than"
< means "is less than".
QuoteI haven't used a SS to test it
Why not? PROPOSED answers should be tested before posting, to avoid giving misleading advice (see above).
|