You can use VBA in Excel to do this. In Excel, do Alt+F11 to get to the VBA
editor. In the Project window, make sure you workbook is selected (or
select it). then do Insert=>Module
paste in code like this:
Sub Updatecount()
If Selection.Columns.Count > 1 Then Exit Sub
icnt = 0
For i = 1 To Selection.Count - 1
If Selection(i) <= Selection( _
Selection.Count) Then _
icnt = icnt + 1
Next
Selection(Selection.Count, 2).Value = icnt
End Sub
Do Alt+F11 to go back to Excel.
Select 10 contiguous cells in a column with the column to the right blank.
do Tools=>Macro=>Macors and select Updatecount. Then hit run.
You should be able to do most things that you have done in qbasic, right in
Excel.