Quantity x price formula in the same row

Hello Airtable community!

I would like to be able to choose the quantity of a product A or B ON THE SAME ROW and multiply this quantity with their indicated unit prices.

  1. Is my approach right? do you have another solution?
  2. How to multiply the quantities (by products entered) and unit price (by products entered) to obtain a TOTAL
    Is there a formula?

Thank you

Hey Melissa,

I was able to create a formula that will allow you to do this. I recreated your screenshot, see below.

Here is the formula in ‘Total’:

((IF(FIND(",",Quantity)!=0,LEFT(Quantity,(FIND(",",Quantity)-1)),Quantity)+0)*(LEFT(ARRAYJOIN({Price (from Test 1)}, ","),FIND(",",ARRAYJOIN({Price (from Test 1)}, ","))-1)+0))+(IF(FIND(",",Quantity)!=0,RIGHT(Quantity,(FIND(",",Quantity)-1)),Quantity)+0)*(RIGHT(ARRAYJOIN({Price (from Test 1)}, ","),LEN(ARRAYJOIN({Price (from Test 1)}, ","))-FIND(",",ARRAYJOIN({Price (from Test 1)}, ",")))+0)

You should be able to copy this into your ‘Total HTVA’ field and just change the field names to match yours.

I should state however that this will only work for 1 or 2 products, anymore and it would not work. If you were likely to have more than 2 products then maybe there is another way.

1 Like

Thank you John for your quick response! it’s very nice. Yes, indeed. I would like to add as many products as I wish ( but also in one line ), do you have a solution?

If a maximum number of products you could link exists, you could create individual link fields, like this.

You could hide some of the fields to clean up the view. Although, if there are lots of products to link, this becomes very clunky very quickly.

Alternatively, the formula I posted above could be extended to include a lot more products, but it would take quite a long time to write.

Sorry I can’t be of more help, hopefully someone else has experienced something similar in the past and has a solution I haven’t come across.

I understand, no worries, thanks for your help!!! :kissing_heart: I hope someone can complete your formula or suggest another idea. again a big thank you for the time you spent

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.