Excel automation for compare and replace

Hi all
This the input data
This the compare table
This is the output data.where the input is having the group rows with highest degree there we should have “Any Any” comparing with other row group count

you can create a dictionary for the teo column in the compare datatable

created a datatable for output, dtOutput

then you can loop through the first datatable and record the first row data, make the array of required data in dtOutput(as required in the output datatable) then check if the company column value is empty, if it is empty keep adding the dictionary value for the key (for the client column values), do this until we have dont receive a new entry in Company column once ee receive, then simply add thr row to the datatable dtOutput

Hope this helps!

Please can you send the exact process ,i didn’t get it.Firstly i should find highest degree of group row to write “Any Any”