Every second A every second B

Values are downloaded to Excel. Dimension for the first row is A and second B and so on. Parameter for the first value is A, second is B and so on. When downloading the data, the parameter is missing and should be added manually.

The starting point.

The end result. This should be done.

This can be done in many ways.

Write manually A and B in A3 and in A4. Activate cells A3 and A4. Touch with cursor the square in low right hand corner in A4 and double click.

Sub Z_AB

ActiveCell.Value = “A”

ActiveCell.Offset(1, 0).Select

ActiveCell.Value = “B”

ActiveCell.Offset(1, 0).Select

End sub

This macro is creating one pair of A and B. If you assign the macro to shortcut key and just press the key as many times as needed.

If you know that there are 20000 records of data and 10000 pairs of A and B should be added, you can use the macro below.

Sub Z_AB2

Dim c

For c = 1 to 10000

ActiveCell.Value = “A”

ActiveCell.Offset(1, 0).Select

ActiveCell.Value = “B”

ActiveCell.Offset(1, 0).Select

Next c

End sub

The macros are useful, if a zero value is presented as blank cell. The double clicking does not work.