MathMakesMeMad
New Member
- Joined
- May 9, 2016
- Messages
- 6
Hello Crew!
I'm really new on this forum and I'm getting used with VBA for excel. So I'm not an expert yet. Please forgive me!
Basically, I have 7 sheets, each one based on different issues. Below I'll write an example, just to have a simple idea. (Columns A to F)
Sheet 1
CODE COUNTRY POPULATION NAME LANGUAGE AVERAGE
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet 2 (=Sheet1!A2) (=Sheet1!B2) (=Sheet1!C2)
CODE COUNTRY POPULATION MOUNTAIN LAKE EXTENSION
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet 3
CODE COUNTRY POPULATION RELIGION MEMBERS LABEL
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody> sheet 4/sheet 5...
and so on.
Always with the first 3 columns A to C repeated and mirrored.
I'm struggling to create a code which can sort all the sheets simultaneously, when I sort by Code, or by country, or by population in the first sheet, given that all those 3 columns are the same in the 7 sheets.
Obviously, If I sort only the first sheet, then it reflects into A-B-C columns of the others sheets, but all related data in columns D to F are messed up!
I guess it's quite simple code, but I don't know how to sort this out!!
Please help!
Any suggestion?
Thanks
Vito
I'm really new on this forum and I'm getting used with VBA for excel. So I'm not an expert yet. Please forgive me!
Basically, I have 7 sheets, each one based on different issues. Below I'll write an example, just to have a simple idea. (Columns A to F)
Sheet 1
CODE COUNTRY POPULATION NAME LANGUAGE AVERAGE
1 | ITALY | 1,000,000 | italian | italian | 27 |
2 | SPAIN | 2,500,000 | spanish | spanish | 25 |
3 | BRAZIL | 30,000,000 | brazilian | portuguese | 23 |
4 | CANADA | 17,000,000 | canadian | english | 24 |
5 | FRANCE | 1,800,000 | french | french | 26 |
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet 2 (=Sheet1!A2) (=Sheet1!B2) (=Sheet1!C2)
CODE COUNTRY POPULATION MOUNTAIN LAKE EXTENSION
1 | ITALY | 1,000,000 | Bianco | Garda | 1500 |
2 | SPAIN | 2,500,000 | Teide | Zzz | 1800 |
3 | BRAZIL | 30,000,000 | Yyyy | That | 2030 |
4 | CANADA | 17,000,000 | Xxx | Dontknow | 1900 |
5 | FRANCE | 1,800,000 | Blanche | Xyz | 2700 |
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet 3
CODE COUNTRY POPULATION RELIGION MEMBERS LABEL
1 | ITALY | 1,000,000 | Catholic | 1,200,000 | C |
2 | SPAIN | 2,500,000 | Blablabla | 2,000,000 | E |
3 | BRAZIL | 30,000,000 | Catholic | 1,000,000 | A |
4 | CANADA | 17,000,000 | British | 6,000,000 | G |
5 | FRANCE | 1,800,000 | Protestant | 3,000,000 | F |
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
and so on.
Always with the first 3 columns A to C repeated and mirrored.
I'm struggling to create a code which can sort all the sheets simultaneously, when I sort by Code, or by country, or by population in the first sheet, given that all those 3 columns are the same in the 7 sheets.
Obviously, If I sort only the first sheet, then it reflects into A-B-C columns of the others sheets, but all related data in columns D to F are messed up!
I guess it's quite simple code, but I don't know how to sort this out!!
Please help!
Any suggestion?
Thanks
Vito