View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Elvis[_2_] Elvis[_2_] is offline
external usenet poster
 
Posts: 6
Default Q: macro - enumerating in excel


Thanks for your answer, but the problem is - the contents of the "Question"
line is not a "Question" but it varies, just like all the answers too :)

ex.

A B
Which is the deepest loch in Scotland:
a) Loch Lomand
b) Loch Ness
c) Loch Morar
d) Loch Smith

What was the first of Earth's supercontinents:
a) Pangaea
b) Gondwanaland
c) Rodinia
...

I hope I explained the problem better now :)



"ker_01" wrote in message
...
Although this could be done with a macro (programming), I think you can
accomplish your goal much more easily with a formula.

put a 1 in column A next to your first question, then put this formula in
the next row in column A and copy it all the way down. This assumes your
first question starts in B1 (so this formula would be in A2); adjust the
row
numbers accordingly.

=IF(B2="Question",MAX(B$1:B2)+1,"")

HTH,
Keith

"Elvis" wrote:

Hi all,

this problem to all of you may look trival, but I need some help with
this.

I got the sheet in excel looking like this :

A B
Question
a) answer 1
b) answer 2
c) answer 3
d) answer 4

Question
a) answer 1
b) answer 2
c) answer 3
d) answer 4

and so on..

I need to put the numbers in the row A so they are in front of each
"Question". They should start with 1. and finish with the last "Question"
in
the table.
The number of answers differ, there are 4 or 5 answers for the each
question.

Is this doable ?

Thanks in advance !

Elvis