jbesclapez
Active Member
- Joined
- Feb 6, 2010
- Messages
- 275
Hello,
I have a list from A to H.
The last row of the list is told by the last cell in column H. The data in column H is unique and always "grouped", like sorted.
The column H defines the "group" of the Answers from 1 to 7. It would probably be more clear to have column H in A, but I cannot change that... it was built like that. However... Here is below the table has it looks today (see below).
<tbody>
</tbody>
So from the table below, you see that :
- Question DG44.2#68 has 3 lines with a total of 3 answers.
- Question DG44.3#69 has 4 lines with a total of 5 answers.
- Question DG44.3#69C has 8 lines (some empty ones) with 9 answers.
The trick I need is that answers to any question should be unique.
I underlined a problem on question DG44.3#69 where the answers are doubled (05816).
In column I, i would like something that stops the error on the question. Like this:
EXPECTED RESULT:
<tbody>
</tbody>
Could someone create a VBA to solve that?
Please have the VBA loop, because there can be many errors in different questions.
The VBA MUST NOT touch the list. (so no "sort by", "delete" blanks...), sorry.
I hope I am clear enough.
Thanks for having a look at it!
I have a list from A to H.
The last row of the list is told by the last cell in column H. The data in column H is unique and always "grouped", like sorted.
The column H defines the "group" of the Answers from 1 to 7. It would probably be more clear to have column H in A, but I cannot change that... it was built like that. However... Here is below the table has it looks today (see below).
Answer1 | Answer2 | Answer3 | Answer4 | Answer5 | Answer6 | Answer7 | Question |
03513 | DG44.2#68 | ||||||
03514 | DG44.2#68 | ||||||
03520 | DG44.2#68 | ||||||
01327 | 05816 | DG44.3#69 | |||||
05816 | DG44.3#69 | ||||||
05821 | DG44.3#69 | ||||||
05823 | DG44.3#69 | ||||||
11803 | DG44.3#69 | ||||||
08018 | 07903 | 00416 | DG44.3#69C | ||||
08043 | 00419 | DG44.3#69C | |||||
08055 | 00420 | DG44.3#69C | |||||
00422 | DG44.3#69C | ||||||
00426 | DG44.3#69C | ||||||
DG44.3#69C | |||||||
DG44.3#69C | |||||||
DG44.3#69C |
<tbody>
</tbody>
So from the table below, you see that :
- Question DG44.2#68 has 3 lines with a total of 3 answers.
- Question DG44.3#69 has 4 lines with a total of 5 answers.
- Question DG44.3#69C has 8 lines (some empty ones) with 9 answers.
The trick I need is that answers to any question should be unique.
I underlined a problem on question DG44.3#69 where the answers are doubled (05816).
In column I, i would like something that stops the error on the question. Like this:
EXPECTED RESULT:
Answer1 | Answer2 | Answer3 | Answer4 | Answer5 | Answer6 | Answer7 | Question | |
03513 | DG44.2#68 | |||||||
03514 | DG44.2#68 | |||||||
03520 | DG44.2#68 | |||||||
01327 | 05816 | DG44.3#69 | Error in DG44.3#69 | |||||
05816 | DG44.3#69 | |||||||
05821 | DG44.3#69 | |||||||
05823 | DG44.3#69 | |||||||
11803 | DG44.3#69 | |||||||
08018 | 07903 | 00416 | DG44.3#69C | |||||
08043 | 00419 | DG44.3#69C | ||||||
08055 | 00420 | DG44.3#69C | ||||||
00422 | DG44.3#69C | |||||||
00426 | DG44.3#69C | |||||||
DG44.3#69C | ||||||||
DG44.3#69C | ||||||||
DG44.3#69C |
<tbody>
</tbody>
Could someone create a VBA to solve that?
Please have the VBA loop, because there can be many errors in different questions.
The VBA MUST NOT touch the list. (so no "sort by", "delete" blanks...), sorry.
I hope I am clear enough.
Thanks for having a look at it!