Hello Marnel Strydom,

Welcome to Microsoft Q&A Forum.

I understand what you are trying to do. To calculate the total cost in Sheet2 using the "Amount per Unit" from Sheet1, the most reliable approach—especially if you're using Microsoft 365—is to use the XLOOKUP function. It is more flexible and easier to maintain than VLOOKUP.

You can put this formula in the "cost" cell:

=XLOOKUP(A2, Sheet1!A:A, Sheet1!E:E, "Not Found") * B2

This formula looks up the product name in cell A2 of Sheet2, finds the matching product in column A of Sheet1, retrieves the corresponding "Amount per Unit" from column E, and multiplies it by the quantity in cell B2 of Sheet2.

Explanation:

  • A2: Product name in Sheet2
  • Sheet1!A:A: Product column in Sheet1
  • Sheet1!E:E: "Amount per Unit" column in Sheet1
  • "Not Found": Optional message if the product is not found
  • B2: Quantity in Sheet2

I hope this is what you're looking for.

Best regards,

Thomas

---------------------------------------------------------------------------------------------------------------------------------------- 

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

Answer from Thomas4-N on learn.microsoft.com
🌐
Excel Insider
excelinsider.com › home › excel for finance › how to calculate cost per unit in excel (3 effective ways)
How to Calculate Cost Per Unit in Excel (3 Effective Ways) - Excel Insider
August 22, 2025 - Add the variable cost to the fixed cost in order to calculate the total cost in Excel. The formula should be written as follows: If the fixed cost is per unit: =A1+B1 In this formula, A1 is the fixed cost, and B1 is the variable cost.
Discussions

How to calculate the average cost of something per unit that also includes # of actual supply?
u/Steve_FS - Your post was submitted successfully. Once your problem is solved, reply to the answer(s) saying Solution Verified to close the thread. Follow the submission rules -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. Include your Excel version and all other relevant information Failing to follow these steps may result in your post being removed without warning. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/excel
13
15
February 9, 2024
Calculate average price per unit of items
Hi, I'm looking for a single formula which calculates the average price per unit of the average item of a group of items, given the price of the items and the occurrences: I may have autofilter enabled on item occurence tab, and I may want to see only the average price for the item(s) shown... More on mrexcel.com
🌐 mrexcel.com
3
0
December 12, 2009
(Excel)Calculating costs, where prices differ based on quantities - Stack Overflow
I'm looking for some help as I'm not really sure of the correct terms to use on my query below, so whilst normally I would google this, I'm not really sure what to search for. I need to work out ... More on stackoverflow.com
🌐 stackoverflow.com
Getting price per unit

You could use VSTACK and stack both part number tables on top of each other and use VLOOKUP or XLOOKUP to find it. Or you could wrap your your lookup formula in an IFNA function to search the other table if the first lookup doesn't return a part number. You could also do an IF statement with a LEFT to check if the first character is a D or L for what is entered and then direct the IF statement to look up the D or L table depending on the the true or false of the LEFT check. Many ways to do this.

More on reddit.com
🌐 r/excel
12
1
November 1, 2022
🌐
Investopedia
investopedia.com › ask › answers › 032715 › how-can-i-calculate-breakeven-analysis-excel.asp
How Can I Calculate Break-Even Analysis in Excel?
January 15, 2025 - Break-Even Price = 1 / ((1 - Total Variable Costs Percent per Unit)*(Total Fixed Costs per Unit)) There are several ways to model break-even analysis in Excel. The two most useful are to create a break-even calculator or to use Goal Seek which is a built-in Excel tool.
🌐
Excel Forum
excelforum.com › excel-general › 796243-formula-for-increasing-cost-per-unit.html
formula for increasing cost per unit
update: i've figured out a way ... 3, 0))/VLOOKUP(B30, defensechart, 2, 0)] so: {lookup building name in the chart, to find initial cost. divide by 10 (rise in cost). multiply that by the number currently have. add to initial cost. divide total by unit of interest (defense, ...
🌐
Reddit
reddit.com › r/excel › how to calculate the average cost of something per unit that also includes # of actual supply?
r/excel on Reddit: How to calculate the average cost of something per unit that also includes # of actual supply?
February 9, 2024 -

Let's say I'm trying to buy and sell apples for a profit, and my goal is determine the actual average value of every single apple.

In A1, I have the price of apples from Shop #1, which is 3.00. In B1, I put down 50 since Shop #1 has 50 apples.

In A2, I put down 4.00 since that's the price of apples from Shop #2. However, in B2, I only put down 1 because the shop only sells 1 single apple.

If I take the average of A1 and A2, it will give me 3.50 as the average cost of apples. However, this is incorrect. Clearly it should be closer to 3.00 since there is a total of supply of 51 apples, and 50 of them are priced at 3.00.

Example below:

A (Price per apple) B (amount of apples)
1 3.00 50
2 4.00 1
AVERAGE PRICE PER APPLE 3.5 (NOT CORRECT, but excel calculates it as so)

How do I determine this in excel?

🌐
CliffsNotes
cliffsnotes.com › home › accounting
Calculating Cost per Equivalent Unit in Excel: Formulas & - CliffsNotes
February 9, 2024 - Function: SUM; Divide; Cell Referencing BE11.7 - Using Excel to Calculate Cost per Equivalent Unit PROBLEM How Direct materials costs added to production $ 1,999 Conversion costs added to production 5,378 Direct materials costs in beginning inventory 335 Conversion costs in beginning inventory 767 Equivalent units completed during the month For Direct materials 6,890 For conversion costs 2,450 Req form Funenstiens roasts peanuts and uses the FIFO method of process costing.
🌐
MrExcel
mrexcel.com › forums › question forums › excel questions
Calculate average price per unit of items | MrExcel Message Board
December 12, 2009 - If you chose to dispense with the helpers then your left with a SUMPRODUCT construct utilising an embedded SUBTOTAL function - in turn utilising Volatile OFFSET. It follows then that any single cell approach means a calculation that is Volatile. Speaking personally (and without detailed knowledge of your file) I'd avoid that if I had the chance ...
Find elsewhere
🌐
MyExcelOnline
myexcelonline.com › home › how to calculate per unit price fast in excel – step by step guide
How to Calculate Per Unit Price Fast in Excel - Step by Step Guide | MyExcelOnline
January 11, 2025 - In this article, I'll walk you through the steps to calculate per unit price in Excel, along with tips to customize and automate the process for your needs. Understanding cost per unit is critical for managing expenses and maximizing profits, whether you’re running a business or managing ...
🌐
The Bricks
thebricks.com › resources › guide-how-to-calculate-cost-per-unit-in-excel
How to Calculate Cost Per Unit in Excel
February 3, 2025 - In a new cell, say F7, type "Cost Per Unit ($)". In the adjacent cell, G7, you will combine your totals using cell references. This is far better than typing in the numbers directly, as it allows your calculation to update automatically if any ...
🌐
Contextures
contextures.com › formulas › lookup
Excel Annual Cost Calculator Shows Totals and Differences
December 27, 2024 - These named ranges are used as a lookup for the cost per year calculations. So, when you select a time unit on the CostPerYear sheet, this lookup table returns the number of periods for the selected time unit. For example, select Weekly, and the cost is multiplied by 52 - the number of weeks in a year. On the CostPerYear worksheet, enter your current spending, by filling in the green cells for Scenario A. This screen shot shows the entries in the sample file, and you can edit the list, to include your own current expenses.
🌐
Quora
quora.com › How-can-I-calculate-the-total-cost-of-quantity-with-price-breaks-in-Excel
How to calculate the total cost of quantity with price breaks in Excel - Quora
Answer (1 of 5): Put the Quantity and price breaks in columns A & B as follows: Qty Price 1 20 11 18 20 16 50 13 101 12 To get the unit price for the requested quantity use the formula =VLOOKUP(D3,$A$1:$B$6,2,TRUE) where D3 is the cell to the ...
🌐
Wall Street Prep
wallstreetprep.com › home › average cost (per unit cost)
Average Cost (Per-Unit Cost) | Formula + Calculator
September 18, 2024 - Step 2 → Determine the Total Production Costs Incurred in the Corresponding Period · Step 3 → Divide the Total Cost of Production by the Total Number of Units Produced · The formula to calculate the average cost is as follows.
🌐
ExcelDemy
exceldemy.com › home › excel formulas › how to calculate cost per unit in excel (with easy steps)
How to Calculate Cost per Unit in Excel (With Easy Steps) - ExcelDemy
June 24, 2024 - Use this formula in cell K13 to get the total fixed cost per unit product. ... You can add new rows in the Fixed Cost and Variable Cost table to insert new costs without changing the formula. Right-click on the 13th row on the leftmost button. Select the Insert option. You’ll get a new row above the final sum. You can input new values and the rest of the table will be updated automatically. ... OSMAN GONI RIDWAN is a marine engineer who loves exploring Excel and VBA programming.
🌐
Wall Street Mojo
wallstreetmojo.com › home › all blogs › budgeting resources › cost per unit
Cost Per Unit - What Is It, Formula, Examples, Vs Price Per Unit
September 5, 2025 - 📊 Master Excel & Finance Skills Join 100K+ Learners ⚡Up to 80% OFF! Instructor: Dheeraj Vaidya, CFA, FRMLET'S CHAT! ... ShareFP&A Training for Real-World Impact! Download FREE Cost Per Unit Excel Template and Follow Along! ... Cost Per Unit can be defined as the amount of money spent by the company during a period for producing a single unit of a particular product or the services of the company, which considers two factors for its calculation, i.e., variable cost and the fixed cost and this number helps in determining the selling price of the product or services of the company.
🌐
Xodo
xodo.com › blog › how-to-calculate-profit-excel
How to Calculate Profit with Excel
You’ll then see the profit percentages for each cell. You can use the =SUM function as the total profit formula to calculate the total amount of money you have earned. In this example, click on cell C7. Then type in: =SUM(C2:C6) If you need to calculate profit in Excel often, you can save these functions as a spreadsheet template for the next time you need a new sheet to calculate your profits.
🌐
The Bricks
thebricks.com › resources › guide-how-to-calculate-cost-per-unit-in-excel-using-chatgpt
How to Calculate Cost Per Unit in Excel using ChatGPT
February 20, 2025 - This is your foundation, so you want to get it right. Open Excel and start with a clean sheet. You'll want to label your columns with the necessary data points: ... For example, if you’re calculating the cost per unit for different products, each row would represent a different product.
Top answer
1 of 3
1

Well, here is one way, but you don't state what the rate is between 21 and 30...

very basic, but you should be able to edit and expand as you want.

Do note that the limits (30 miles, 50 miles) and rates used in the formula all come from the sheet - so if the 30 mile limit changes to 25 miles - all you need to do is change cell A7...

2 of 3
0

I apologize for not answering sooner, but I find this question a bit difficult to address due to the complexity of formulas we can encounter. I know the one you documented is not the most complex one we might encounter, but I was not sure if that was your actual problem or if it was intended as a simple example. I have seen a variety of other things which have often thrown me for a loop.

For example, take this set of rules:

Minimum Fee is $23.50 up to $500
$501 - $2,000 = $3.05 per 100 unit increment
$2,001 - $25,000 = $14.00 per 1000 unit increment over $2,000
$25,001 - $50,000 = $10.10 per 1000 unit increment over $25,000
$50,001 - $100,000 = $7.00 per 1000 unit increment over $50,000
$100,001 - $500,000 = $5.60 per 1000 unit increment over $100,000
$500,001 - $1,000,000 = $4.75 per 1000 unit increment over $500,000
$1,000,001 - $9,999,000 = $3.65 per 1000 unit increment over $1,000,000
$10,000,001 and up = $3.65 per 1000 unit increment over $10,000,000

It does not look too different from yours except that there is an increment of something other than a single unit. In other words for the $501 to $2,000 range, $501 to $600 would all get the same additional $3.05 incremental charge. Another dollar would actually double this because it jumps to the next increment. Like your example, each range builds on the prior range. Assuming that these amounts are in colums A through F:

i   Low                 High    Fee     Base Fee    Per
0             1          500              23.50 
1           501        2,000    $3.05                100
2         2,001       25,000   $23.50               1000
3        25,001       50,000   $10.10               1000
4        50,001      100,000    $7.00               1000
5       100,001      500,000    $5.60               1000
6       500,001    1,000,000    $4.75               1000
7     1,000,001    9,999,999    $3.65               1000
8    10,000,000                 $3.65               1000

Note also that the rate declines as the amounts increase whereas yours appears to increase.

What I did with this is create a maximum value in Column H as follows:

i   Max
0   =E3
1   =INT((C4-C3)/F4)*D4
2   =INT((C5-C4)/F5)*D5
3   =INT((C6-C5)/F6)*D6
4   =INT((C7-C6)/F7)*D7
5   =INT((C8-C7)/F8)*D8
6   =INT((C9-C8)/F9)*D9
7   =INT((C10-C9)/F10)*D10
8   

The first one, where i is zero, is simply the base fee. The others are computed and copied. There is no maximum for the last row. I did not really think I needed this column but it made it easier to devise the formulas.

Assuming that I put an amount to evaluate in Cell I2, it will be evaluated as follows where the formula in row 3 (where i=0) is the set fee but all others are basically a copied formula:

i   4,950
0   =IF(I$2>=$B3,$H3,0)
1   =IF(I$2>=$B4,IF($H4="",INT((I$2-$C3)/$F4)*$D4,MIN($H4,INT((I$2-$C3)/$F4)*$D4)),0)
2   =IF(I$2>=$B5,IF($H5="",INT((I$2-$C4)/$F5)*$D5,MIN($H5,INT((I$2-$C4)/$F5)*$D5)),0)
3   =IF(I$2>=$B6,IF($H6="",INT((I$2-$C5)/$F6)*$D6,MIN($H6,INT((I$2-$C5)/$F6)*$D6)),0)
4   =IF(I$2>=$B7,IF($H7="",INT((I$2-$C6)/$F7)*$D7,MIN($H7,INT((I$2-$C6)/$F7)*$D7)),0)
5   =IF(I$2>=$B8,IF($H8="",INT((I$2-$C7)/$F8)*$D8,MIN($H8,INT((I$2-$C7)/$F8)*$D8)),0)
6   =IF(I$2>=$B9,IF($H9="",INT((I$2-$C8)/$F9)*$D9,MIN($H9,INT((I$2-$C8)/$F9)*$D9)),0)
7   =IF(I$2>=$B10,IF($H10="",INT((I$2-$C9)/$F10)*$D10,MIN($H10,INT((I$2-$C9)/$F10)*$D10)),0)
8   =IF(I$2>=$B11,IF($H11="",INT((I$2-$C10)/$F11)*$D11,MIN($H11,INT((I$2-$C10)/$F11)*$D11)),0)

The Fee for this is the sum of all of the rows (labeled i, 0 through 8 above). in this example, it would be 23.50 plus 45.75 plus 28.00 for a total of 97.25.

Not too bad. How about a set like this:

No fee if $1,000 or less
$1,001 - $5,000 = $80.00 + 3% of excess over $1,000.00 per 100 unit increment
$5,001 - $10,000 = $250.00 + 2% of excess over $5,000.00 per 500 unit increment
$10,001 - $25,000 = $350.00 + 1% of excess over $10,000.00 per 1000 unit increment
$25,001 and Over = $520.00 + 3/4% of excess over $25,000.00 per 1000 unit increment

In your formula, the initial flat amount never changes and once you've computed the amount for that range, other ranges build upon it. Here, there are steps. For example at $1,000 the fee is zero, but at $1,001, it jumps to $80 as if there were an $80 fee for the first 1000. Without boring you with the entire table, Here is the formula for computing the range from 5,001 to 10,000 assuming that G2 contains the amount to use and Row 5 colums A through E are the following:

Low     High        Rate      Minimum   Increment
 5,001   10,000     2.00%        250         500 

=($D5+$C5*INT(($G$2-($A5-1))/$E5)*$E5)*($G$2>=$A5)*OR($B5="",$G$2<=$B5)

The formula simply looks at the current row and does the computation if the amount in G2 falls within the range from Column A to Column B.

A simplification of all of the above comes when each range cumulatively builds on the prior ranges AND the rate of payment is always increasing, like the U.S. Tax Tables:

    Over    Not Over        
      0       9,525     10% of taxable income
  9,525      38,700     $952.50 plus 12% of the excess over $9,525
 38,700      82,500     $4,453.50 plus 22% of the excess over $38,700
 82,500     157,500     $14,089.50 plus 24% of the excess over $82,500
157,500     200,000     $32,089.50 plus 32% of the excess over $157,500
200,000     500,000     $45,689.50 plus 35% of the excess over $200,000
500,000                 $150,689.50 plus 37% of the excess over $500,000

Here, we can use something referred to as the "deskpad method" to shortcut the computation

Assuming that the amount to be evaluated is in G1 and these are in column A through C starting in Row 1:

Over    Not Over    Rate
      0   9,525     10.0%
  9,525  38,700     12.0%
 38,700  82,500     22.0%
 82,500 157,500     24.0%
157,500 200,000     32.0%
200,000 500,000     35.0%
500,000             37.0%

We compute the amount based on G1 as follows:

=ROUND(SUMPRODUCT($C$2:$C$8-$C$1:$C$7,$G$1-$A$2:$A$8,N($G$1>$A$2:$A$8)),0)

Note: this is not entered as an array formula.

How does this relate to your question. If the need is as simple as you stated (in other words, the rate is always increasing and we do not have any "steps" in the reimbursement, we can compute it similarly to the U.S. Tax computation.

I created these values in columns A through D starting in row 1:

Over    Not Over        
  0      20     £-      Flat Amount of £10.00
 20      50     £0.50   £10.00 plus £.50 per mile over 20 miles
 50     100     £1.00   £25.00 plus £1.00 per mile over 50 miles
100             £1.50   £75.00 plus £1.50 per mile over 100 miles

where column D is just descriptive. I put the £10.00 flat fee in Cell E1.

Assuming that G1 contains the number of miles, we would compute the reimbursement as:

=$E$1+ROUND(SUMPRODUCT($C$2:$C$5-$C$1:$C$4,$G$1-$A$2:$A$5,N($G$1>$A$2:$A$5)),2))

For example, when G1 is 52 miles, the computation is £27.00

Note: this is not entered as an array formula.

So, if this is the situation, what you would need is a place to house Columns A through C, a place to house the flat amount and a formula similar to what I provided to compute the reimbursement based on the cell housing the number of miles.

Please note that all the earlier items indicate that this formula will not be so simple if the rate is stepped or the rate declines or if the incremental unit is something other than 1 mile.

I hope that some of this makes sense. Good luck.

🌐
EDUCBA
educba.com › home › finance › finance resources › finance formula › cost of sales formula
Cost of Sales Formula | Calculator (Examples with Excel Template)
July 27, 2023 - Ending Inventory = No. of Units at the End of the Year * Price Per Unit (Current) ... Cost of Sales = Beginning Inventory + Raw Material Purchase + Cost of Direct Labor + Overhead Manufacturing Cost – Ending Inventory
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Microsoft Community
techcommunity.microsoft.com › microsoft community hub › communities › products › microsoft 365 › excel
working out unit price
November 3, 2023 - what I want is a function which returns 3 as that is is the unit price rather than the sum of all the unit prices for values less than 35000 in this case.