+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,335

    Question Replace paragraphs with condition

    hi all.

    I really stucked, I need urhent help. thx in advance. I placed this thread in Programming forum, cuz I think I need some macro.

    in this document (this document is questionarie for examining) almost 60 pages with more than 400 questions.The questions with options were copied from PDF document.

    The problem is that when pasting text into Word, also were pasted a lot of paragraph marks which need to be eliminated

    For example I have

    Code:
    QUESTION 25
    While giving a day-long presentation on economic theory, the speaker made use of a
    white board, a flip chart, an overhead projector to show slides and animations, and a set
    of speakers attached to a laptop to play interviews with prominent experts in the field.
    Evaluations following the presentation were positive. Which of the following is true
    regarding the use of media in this presentation?
    A. The extended use of media distracts learners from the purpose intended.
    B. This use of media limits the amount of learner interaction.
    C. Technology-based media should have been used more extensively.
    D. The specific media are perceived to be an integral part of the instruction.
    How can I make it to look like on this one.

    Code:
    QUESTION 25
    While giving a day-long presentation on economic theory, the speaker made use of a white board, a flip chart, an overhead projector to show slides and animations, and a set of speakers attached to a laptop to play interviews with prominent experts in the field. Evaluations following the presentation were positive. Which of the following is true regarding the use of media in this presentation? 
    A. The extended use of media distracts learners from the purpose intended.
    B. This use of media limits the amount of learner interaction.
    C. Technology-based media should have been used more extensively.
    D. The specific media are perceived to be an integral part of the instruction.
    Right now I highlight each question and replace it paragraph mark with space. I'd like to remind that there're more than 400 questions.

    Any help would be greatly appreciated....

    Thanks in advance
    Attached Files Attached Files
    Last edited by contaminated; 01-07-2010 at 05:22 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

  2. #2
    Forum Moderator teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    2003 & 2010
    Posts
    10,042

    Re: Replace paragraphs with condition

    Vusal, this is not a macro solution and far from perfect, but what I typically do:

    I find/replace two paragraph marks with some absurd symbol like "***" -- this will take care of "real" paragraph breaks with an empty line between paragraphs.

    next, find/replace a full stop and a paragraph mark with "***" (this will take care of end of paragraphs that end in a dot, but only have one paragraph mark)

    Try and see if you can spot any other regular pattern for paragraph marks that you want to keep and replace them with "***"

    next, replace all remaining paragraph marks with " "

    Finally, replace all "***" with paragraph marks.

    This will still leave some cleanup to do, but it should be a lot less than initially.

    hth
    teylyn
    Microsoft MVP - Excel
    At Excelforum, you can say "Thank you!" by clicking the icon below the post.

    Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.

  3. #3
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,335

    Smile Re: Replace paragraphs with condition

    Yes
    I agree with you. Immediately after posting the thread I've understood how to do that. Thanks for responce but I've just overcame this problem using Find And Replace option.

    This not the best solution as well but this is how I made it.

    1 Replaced all paragraph marks with single gap.
    2. Because the document had several gap between word I replaced them also with single one (^w on " " (w/o quotes))
    3. Each question had it own headin like QUESTION 1 through QUESTION 438. I eliminated numbers after question: Replace What QUESTION ^# With QUESTION; QUESTION ^#^# With QUESTION and finally UESTION ^#^#^# With QUESTION in order to have only QUESTION as an header w/o following number.
    4. Then Replaced QUESTION with ^pQUESTION^P.
    5. Because all QUESTION word had red colored I highlighted then all and numbered
    6 Each options(answers for questions) starts with letter A. B. C. and D. Using Find and replace I replaced each A. with ^p A. for each letter separately.


    Thx again
    Last edited by contaminated; 01-07-2010 at 05:20 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

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