Sorting data by column name and sum the amount

hi i have to do this. i don’t know how, but i have to separate the other hr that have specific ids and some it also. how can i do this?

thank you

Hi @ldiaz

Can you please elaborate on what you want to do and how the output should look like?


the image will be the output.
i want to sort them by column value(PRODUCT SEGMENT). like in the image

the HR in below i want them to separate in the other hr. just those four by using the ID

i have something like this

Hi @ldiaz

Do you mind sending the excel file with input and projected output data please?

And What you you mean by this?

Because I see many columns are different other than sorted column


the file is confidential huhu.

i want to sort them by column value then i want also those four HR that have specific id to seperate in the other HR. like in the first image that i sent.

Hi @ldiaz

So follow these steps

  1. Read the data into a datatable(dt) using read range
  2. Use filter datatable and filter the rows with total(I believe you don’t need them)
  3. Then use another filter and now filter data which contains HR in first column and ‘-’ in second column into a separate datable
  4. Now use sort datatable to sort it and then paste the data as needed