How to count in each filter value in excel

Hi @supermanPunch,

Yours code after execution , second column is not shown in first row so I have to applied directly data table to write range

I think below code grouping issue,if u fix na ,its useful for me,
i have to add third column also.

(From p In DT.AsEnumerable() Group By x= New With { Key.a =p.Item(“column 1”)} y = New With {key.a = p.item(“column 2”)} Into Grp = Group Select resultDT.Clone.LoadDataRow (New Object() {grp(0)(0),grp(0)(0).toString+" Count is "+grp.Count.toString},False)).CopyToDataTable

@Raja.G Do you have to Count the repetition in the Same way like how we have done for First Two Columns?

Hi @supermanPunch,

I has been removed Merge Datatable

DT1–> write range1
DT2–> write range2

But now i have checked ,

This code is process only default 1st column and 2nd column but i need process any of the column, can u help if possible.

Raja G

@Raja.G Any of the Column ? Can you Explain ? Like you want to Specify So many columns at the Beginning and you want to perform the Operaton for those column ?

Hi @supermanPunch,

I want to fetch any of column i need to process.

For example ,
I expected columns any of that columns(2nd ,3rd or 4th column…etc), but i want whatever i applied that column i need to process

Raja G

I want process any of the columns not a default columns

@Raja.G I think this is what you needed, Check this : (13.2 KB)

The Columns you want to do a Repeat Count Should be Mentioned in the columnArray Variable

1 Like


Working fine thanks man , but each column result showed in different sheets , i want output result in one sheet .

@Raja.G That’s a Side effect in my case , i didn’t really get how to do that, if i find a solution for that i’ll Update you :sweat_smile:

Ok @supermanPunch thank you so much,

if u got update please reply me

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.