PDA

View Full Version : Help create Macro remove multi-lines duplicate characters



imbaboy95
09-29-2017, 11:40 AM
Hello, i got stuck with my work, example please see on image 20527
If MACRO find
Line 1: "TIP:"
Line 2: "Question_" //only count from begin of line or we can understand it's 9 characters from left = Question_)
Line 3: "Question_" //only count from begin of line or we can understand it's 9 characters from left = Question_)

Then Macro will remove "Question_" in line 2 but keep all words after Question_.


------------Before Macro run


Question_1. Some body cleans the room every day.


(A) The room every day is cleaned.


(B) The room is every day cleaned.


(C) The room is cleaned every day.


(D) The room is cleaned by somebody every day.


####


Answer (C)


TIP:


Question_1 qweqweqweqwe


Question_2. They cancelled all flights because of fog.


(A) All flights because of fog were cancelled.


(B) All flight were cancelled because of fog.


(C) All flights were because of fog cancelled.


(D) All flights were cancelled by them because of fog


####


Answer (B)


TIP:


Question_2 bcvbcvbvcb

--------After macro run


Question_1. Some body cleans the room every day.


(A) The room every day is cleaned.


(B) The room is every day cleaned.


(C) The room is cleaned every day.


(D) The room is cleaned by somebody every day.


####


Answer (C)


TIP:


1 qweqweqweqwe


Question_2. They cancelled all flights because of fog.


(A) All flights because of fog were cancelled.


(B) All flight were cancelled because of fog.


(C) All flights were because of fog cancelled.


(D) All flights were cancelled by them because of fog


####


Answer (B)


TIP:


2 bcvbcvbvcb


----------------Thank for reading and helping me (Y)!
Regards <3

mdmackillop
09-29-2017, 12:27 PM
Please refer to (http://www.vbaexpress.com/forum/showthread.php?60821-Help!-edit-multi-cells-with-conditions-Thank-all-of-you!&p=369906&viewfull=1#post369906)previous (http://www.vbaexpress.com/forum/showthread.php?60821-Help!-edit-multi-cells-with-conditions-Thank-all-of-you!&p=369906&viewfull=1#post369906) question (http://www.vbaexpress.com/forum/showthread.php?60821-Help!-edit-multi-cells-with-conditions-Thank-all-of-you!&p=369906&viewfull=1#post369906)