Assuming you have your data table in %ExcelData%, the following flow should do it:

The idea behind this flow is as follows:
- You get the list of names via Retrieve data table column into list
- You get a list of unique names by using Remove duplicate items from list. This will result in a list where each name is only included once.
- You create a new data table for output by using Create new data table
- You remove the first row from the new data table, because Create new data table will create it with a single empty row by default. So we use Delete row from data table to remove it.
- You then loop through the list of unique names in a For each loop where:
- You set the amount to 0 via Set variable
- You set the arrears to 0 via Set variable
- You use Find or replace in data table to find all rows in your %ExcelData% where the name equals the current name
- You loop through the matched rows via another For each loop, where:
- You convert the row index to a numeric value by using Convert text to number. This is needed because for some reason the Find or replace in data table action will return the row indexes as strings, but they need to be converted to numbers in order to be used when referencing the table rows.
- You then use the row index to retrieve the amount and convert it to a numeric value via Convert text to number.
- You do the same as above for the arrears value via Convert text to number.
- You use Increase variable to increase the amount value with the current amount you just converted.
- You do the same to the arrears value via Increase variable.
- When the nested loop for the current name ends, you use Insert row into data table to insert a row for the current name with its total values into the output table.
This will result in a %DataTable% variable that will have each name only included once and the two numeric values included as totals. Essentially a sub-total table.
Here's a code snippet that you can copy and paste into your PAD flow designer to have these actions created for you:
Variables.RetrieveDataTableColumnIntoList DataTable: ExcelData ColumnNameOrIndex: $'''Name 1''' ColumnAsList=> NamesList
Variables.RemoveDuplicateItemsFromList List: NamesList IgnoreCase: False
Variables.CreateNewDatatable InputTable: { ^['Name', 'Amount', 'Arrears'], [$'''''', $'''''', $''''''] } DataTable=> DataTable
Variables.DeleteRowFromDataTable DataTable: DataTable RowIndex: 0
LOOP FOREACH CurrentName IN NamesList
SET Amount TO 0
SET Arrears TO 0
Variables.FindOrReplaceInDataTable.FindItemInDataTableByColumnIndex DataTable: ExcelData AllMatches: True ValueToFind: CurrentName MatchCase: True MatchEntireCellContents: True ColumnNameOrIndex: $'''Name 1''' DataTableMatches=> DataTableMatches
LOOP FOREACH MatchedRowData IN DataTableMatches
Text.ToNumber Text: MatchedRowData['Row'] Number=> RowIndex
Text.ToNumber Text: ExcelData[RowIndex]['Amount in local currency'] Number=> CurrentAmount
Text.ToNumber Text: ExcelData[RowIndex]['Arrears after net due date'] Number=> CurrentArrears
Variables.IncreaseVariable Value: Amount IncrementValue: CurrentAmount
Variables.IncreaseVariable Value: Arrears IncrementValue: CurrentArrears
END
Variables.AddRowToDataTable.AppendRowToDataTable DataTable: DataTable RowToAdd: [CurrentName, CurrentAmount, CurrentArrears]
END
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.