+ Reply to Thread
Results 1 to 2 of 2

macro - enumerating ?

  1. #1
    Registered User
    Join Date
    07-02-2009
    Location
    Zagreb
    MS-Off Ver
    Excel 2007
    Posts
    1

    macro - enumerating ?

    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
    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
    ...


    and so on..

    I need to put the numbers in the row A so they are in front of each
    question in row B. 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.

    Basically - something like this:

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

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

    P.S. All the questions are in bold, maybe this could help ?

    Is this doable ?

    Thanks in advance !
    Last edited by de_xt_er; 07-02-2009 at 10:24 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro - enumerating ?

    Select column A and press CTRL-1 to open the Format Cells box.
    Select Number > Custom > Type: #)

    (you'll have to enter that red bit yourself.)

    Now, the following formula can be used to autonumber your questions, as long as the questions and answers are all in column B, perhaps starting at row 3:

    =IF(OR(ISNUMBER(FIND(")",B3)),B3=0),"",MAX($A$1:$A2)+1)
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1