troubleshooting Question

Contactenate MSHFlexgrid1 issue

Avatar of Wilder1626
Wilder1626Flag for Canada asked on
Visual Basic Classic
20 Comments1 Solution352 ViewsLast Modified:
Hi All,

I would need your help to modify that code here:
Dim k As Long

For k = 1 To MSHFlexGrid1.Rows - 1

If MSHFlexGrid1.TextMatrix(k, 1) <> "" Then
   MSHFlexGrid1.TextMatrix(k, 11) = MSHFlexGrid1.TextMatrix(k, 0) & MSHFlexGrid1.TextMatrix(k, 1) & MSHFlexGrid1.TextMatrix(k, 7) & MSHFlexGrid1.TextMatrix(k, 8) & MSHFlexGrid1.TextMatrix(k, 9) & MSHFlexGrid1.TextMatrix(k, 10)

  End If

Next k

What I'm trying to do is to follow these criteria:
If rows from Column 0, 1 and 2 are the same on multiple rows, then it must concatenate all  rows with column 0, 1, 7, 8, 9, 10 in column 11 until a new value from column 0,1,2.

Foe example. If we look at the picture bellow, we see the same value 28, 16 and 00221 on 7 rows.

Then it will concatenate in all rows column 11 all the values of all rows column 0, 1, 7, 8, 9, 10 of the 7 rows to make this result:
281613600900281624600900281635600900281646600900281657600900281661600900281672600900

The number of rows with same value in column 0, 1 , 2 may vary.

How can i do that please?

Thanks for your help.Grid to concatenate
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros