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)
            x = ActiveCell.Value
            ActivellCell.Offset(-1, 3) = DS
        End If


Any help would be much appreciated.

You haven't selected the next cell.