Hi,
I have a datatable, and I have to filter it based on some criteria.
(It contains repeated values just get them once)
The Criteria is it must be divided only for plants and distribute the data in different datatables
I have attached the Input Sheet for the same.
According to the input we will get different datatables as output.
I have attached the output sheet for the same.
Please let me know how to solve the issue?
(Mainly how to get the non repeated values for the 1st column)
Thanks in advance!!
Hi @ppr
How to get it in the form of different datatables and also will this code five the output same as I have provided the Output sheet containing 8 different sheets?
Thanks in advance!!
Hi @ppr
I am a bit confused with the approach.
Because I have tried and ran the solution but it is not giving the desired output
It is just writing for Branch 1507 and Cost 10 and 7
Hi @ppr
We have the data mixed in the input sheet
But we need to divide the data based on Branch and all the value has to be written just once no repetition
I have provided the output sheet in which format the output is required. OutputSheet.xlsx (14.6 KB)
The output has to be in the above provided format.
Thanks!!
Maybe you are looking for a more fine granular grouping where the groups as rated on Branch and Costs
thats why we also recommended:
so have a look on more grouping basics: Link above
And:
TableList | DataType: List(Of DataTable) =
(From d in YourInputDT.AsEnumerable
Group d by k1= d("Branch").toString.Trim, k2= d("Cost").toString.Trim into grp=Group
Select g = grp.CopyToDataTable).toList()
(From d In dtData.AsEnumerable
Group d By k1= d("Branch").toString.Trim, k2= d("Cost").toString.Trim Into grp=Group
Order By CInt(k1), CInt(k2)
Select g = grp.CopyToDataTable).toList()