none
do until loop not working!! RRS feed

  • General discussion

  • so in my sheet, this is what i want to happen

    loop through cells(4,4) to (4,k) until the first empty cell is reached

    if any cell is the same as a cell in another range THEN  (maybe use intersect method)

    select that cell and all populated cells underneath it

    place that "column" at the end

    end loop

    my effort

    With Worksheets("HiPO Input file")
        k = 4
        Do Until .Cells(4, k) = ""
             If Not Intersect(ActiveCell, Range(LowShear)) Is Nothing Then
                Set rng = Range(ActiveCell, ActiveCell.End(xlDown))
             End If
        Loop
    End With
    
    If Not rng Is Nothing Then
        rng.Select
    End If
    

    Monday, February 13, 2017 11:55 AM

All replies