web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Seeking Solution for C...
Power Automate
Unanswered

Seeking Solution for Calculating Total Cost for Multiple Items in Excel Using Power Automate

(1) ShareShare
ReportReport
Posted on by

Objective: I have a form that functions as an order sheet, with data transferred to an Excel sheet. In the Excel sheet, I maintain a list of items and their respective prices in a 'Menu Costs' sheet. My aim is to create a formula or modify a Power Automate workflow to calculate the total cost for a list of items extracted from Power Automate. These items are enclosed within square brackets and separated by commas when multiple items are selected.

 

Menu Cost:

 

Screenshot 2023-09-19 at 13.08.04.png

 

Current Formula for a Single Item: =VLOOKUP(E2,'Menu Costs'!A:B,2,FALSE)*C2

 

Sheet 1:

 

Screenshot 2023-09-19 at 13.06.53.png

 

Form question for food options: 

 

Screenshot 2023-09-19 at 14.32.26.png

 

Question: Can Power Automate be utilized to calculate the cost for multiple items within the 'Food Options' column and accumulate them into the 'Total Cost' column?

Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,989 Super User 2026 Season 1 on at

    Hi @AB21 ,

     

    Here's a working solution from another question I answered last week; works good!

     

    trice602_0-1695133387240.png

     

    Initialize two variables as shown below.

     

    trice602_1-1695133428889.png

     

    trice602_2-1695133459981.png

     

    Here's the expression for temp1 above:

     

    add(variables('sumtotal'),int(item()))
     
    This works well and will loop through your array and add up the numbers.  I like this option very much and is my current go-to model.
     
     
  • AB21 Profile Picture
    on at

    Hi @trice602 Thanks! So where does the output go? I need go into the excel if thats possible? I also need this display the items in a column "Food option" and and displays the cost in the column cost. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard