Hello, I am new to VBA and feel this might be quite a simple issue - but I just don't have a clue what to do.
When I put this bit of code into my function, when I try and run it Excel gets stuck and I have to force close Excel.

  Do Until IsEmpty(ActiveCell)
         ' Check active cell for search value.
         If ActiveCell.Value = x Then
            DS = DS + ActiveCell.Offset(0, 1)
        Else
            x = ActiveCell.Value
            ActivellCell.Offset(-1, 3) = DS
        End If

        Loop

Any help would be much appreciated.

You haven't selected the next cell.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.