We help IT Professionals succeed at work.
Get Started

VB6 convert MSHFlexgrid1 cells

Wilder1626 asked
Last Modified: 2016-07-25

I have this MSHFlexgrid1 where in Column 0,1 and 11, I may have multiple rows with the same values. Everything is already sorted by those 3 columns.

Using this:
    With MSHFlexGrid1
     .ColSel = 11
        .Sort = flexSortStringAscending
        .ColSel = 1
        .Sort = flexSortStringAscending
        .ColSel = 0
        .Sort = flexSortStringAscending
    End With

Open in new window

What i would like to do is that if i have multiple rows with the same value in column 0, 1 and 11, it will leave all cell populated  as it is and also add the letter "H" in column 4 of the first row only.
Then, it will empty the value in column 3 and add the letter "D" in column 4.

Example of the grid before the macro:
Then after the macro:
What would be the best way to do that as i can have up to 7000 rows in the grid.

I have put a sample of the project in attachment.

Thanks for your help
Watch Question
Keep everyone healthy; Wear a mask - Social distance - Don't touch your face - Wash your hands for 20 seconds
Most Valuable Expert 2017
Distinguished Expert 2020
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE