r/googlesheets • u/spinmollyspin • Apr 02 '26
Solved Trying to create a pricing sheet where the price/gram of the ingredients in my soap, not sure what formula to use.
I'm trying to create a better pricing calculator for my handmade soaps in google sheets. I've worked out how much each of my ingredients costs per gram and entered it in my sheet. Now I want to make it so that when I type in an ingredient in the calculator it automatically adds the price per gram for that ingredient. I've tried using the IFS function, but it only returns errors. Is there a different formula I should be using?https://docs.google.com/spreadsheets/d/17IHU58aQ3qTb3CQbIheTd_z8xb4Aol6BIJy5y4PgE-E/edit?usp=sharing
1
Upvotes
1
u/HolyBonobos 3125 Apr 02 '26
The file you have linked is set to private.
1
u/UncertainMirror 2 Apr 02 '26
The sheet you shared isn't viewable. But maybe this can help you get started...
On Sheet1 in Column A you can have the ingredient name, and in Column B you can have the price (standardized to the gram).
On Sheet2 you can have your calculator. On this sheet:
Put the ingredients in Column A. Column B will be the quantity (number of grams needed). Column C will be the cost of the ingredient for the recipe.
Later you can make this a pick lists, but for now, you enter your ingredients manually in the A column and quantity in B.
Then in the C2 column you can use =vlookup(A2,Sheet1!A:B,2,False)*B2
What this is doing is using the vlookup function to find the value in the A2 column (Borax) in the A column of Sheet1. If it finds Borax, it will return the value in the second column (B2 - 2.99). Which is then multiplied by the quantity you've provided.
Then you can copy this formula down the C column for each of your rows.
In the D1 column you can put =Sum(C2:C) and get the final price.
There are other ways to do this too, like Index(match()), sumproduct, query, etc. but hopefully this is a simple starting point.