PunchyBear
New Member
- Joined
- Sep 15, 2011
- Messages
- 1
I am fairly new to VBA so please forgive any obvious errors. I have 3 columns of data. In some cases all are duplicated in others some are duplicated in others none.First sort is by column A, ID numbers;if this is not duplicated then copy contents of column a,b,c to new spreadsheet. If column A is duplicated then select lowest value in column B&C and copy Column A,B & C to the same spreadsheet as previous. Values in column B & C are Alpha. example of column B contents zzzzzz(BBB-) and column C BBB-. It is only the contents inside the brakets that are important(on the whole)so for the below extract of s/s data i have noted in column D a few examples of what data i would like macro to produce.
below list shows order AAA is Highest
AAA
AA+
AA
AA-
A+
A
A-
BBB+
BBB
BBB-
BB+
BB
BB-
B+
B
B-
CCC+
CCC
CCC-
CC
C
D
<colgroup><col style="width: 32pt; mso-width-source: userset; mso-width-alt: 1572;" width="43"> <col style="width: 47pt; mso-width-source: userset; mso-width-alt: 2267;" width="62"> <col style="width: 45pt; mso-width-source: userset; mso-width-alt: 2194;" width="60"> <col style="width: 48pt;" span="5" width="64"> <tbody>
</tbody>
below list shows order AAA is Highest
AAA
AA+
AA
AA-
A+
A
A-
BBB+
BBB
BBB-
BB+
BB
BB-
B+
B
B-
CCC+
CCC
CCC-
CC
C
D
ID | Min | ABS | |||||
ACC06 | |||||||
ACC06 | Grade (BBB-) | BBB- | |||||
ACC06 | Grade (BBB-) | BBB- | A,B & C of either row 3 or 4 as values are the same | ||||
AISE1 | |||||||
AISE1 | |||||||
AISE1 | High Yield (BB-) | BB- | |||||
AISE1 | Grade (BBB-) | BBB | |||||
AISE1 | Grade (BBB-) | BBB | A, B & C of row 7, BB- is lower than BBB | ||||
CSPP2 | |||||||
CSPP2 | High Yield No Min Rating | D | A, B & C of row 11 | ||||
DANSK | A, B & C of row 12 (No dupe) | ||||||
DYSE2 | |||||||
DYSE2 | Grade (BBB-) | BBB- | |||||
DYSE2 | Grade (BBB-) | BBB- | |||||
DYSE2 | Grade (BBB-) | BBB- | A, B & C of either row 14,15 or 16 | ||||
FIBPS | ll Yield (BB-) | Not Permitted | |||||
FIBPS | ll Yield (BB-) | Not Permitted | A, B & C of either row 17 or 18 | ||||
SER03 | High Yield No Min Rating | D | A, B & C of row 19 |
<colgroup><col style="width: 32pt; mso-width-source: userset; mso-width-alt: 1572;" width="43"> <col style="width: 47pt; mso-width-source: userset; mso-width-alt: 2267;" width="62"> <col style="width: 45pt; mso-width-source: userset; mso-width-alt: 2194;" width="60"> <col style="width: 48pt;" span="5" width="64"> <tbody>
</tbody>