Hi
I'm new to using Macros. So need your help.
I have 2 huge data files from which I need to consolidate into one.
I think its better to use macros to do this for me as writing a formula and running them each time is time consuming taking into account the size of the data.
Sample data as follows:
Sheet 1.
Id Name No
1 A 10
2 B 20
3 A 11
4 B 21
5 C 15
Sheet 2.
Id Description Amount
1 Revenue 1000
1 Expenses 600
1 Gross profit 400
1 Tax 20
1 Net Profit 380
2 Revenue 900
2 Expenses 500
2 Gross profit 400
2 Tax 20
2 Net Profit 380
3 Revenue 950
3 Expenses 550
3 Gross profit 400
3 Tax 20
3 Net Profit 380
4 Revenue 950
4 Expenses 550
4 Gross profit 400
4 Tax 20
4 Net Profit 380
5 Revenue 800
5 Expenses 400
5 Gross profit 400
5 Tax 20
5 Net Profit 380
Sheet3. Master Worksheet (Need macros to produce below result)
Id Name No Revenue Expenses Gross profit Tax Net Profit
1 A 10 1000 600 400 20 380
2 B 20 900 500 400 20 380
3 A 11 950 550 400 20 380
4 B 21 950 550 400 20 380
5 C 15 800 400 400 20 380
Criterias:
Id - Should be from Sheet 1
Name - Should be from Sheet 1
No - Should be from Sheet 1
Revenue / Expenses/Gross Profit / Tax / Net Profit should be from Sheet 2 if it matches the 'ID' as in Sheet 1.
I'm new to using Macros. So need your help.
I have 2 huge data files from which I need to consolidate into one.
I think its better to use macros to do this for me as writing a formula and running them each time is time consuming taking into account the size of the data.
Sample data as follows:
Sheet 1.
Id Name No
1 A 10
2 B 20
3 A 11
4 B 21
5 C 15
Sheet 2.
Id Description Amount
1 Revenue 1000
1 Expenses 600
1 Gross profit 400
1 Tax 20
1 Net Profit 380
2 Revenue 900
2 Expenses 500
2 Gross profit 400
2 Tax 20
2 Net Profit 380
3 Revenue 950
3 Expenses 550
3 Gross profit 400
3 Tax 20
3 Net Profit 380
4 Revenue 950
4 Expenses 550
4 Gross profit 400
4 Tax 20
4 Net Profit 380
5 Revenue 800
5 Expenses 400
5 Gross profit 400
5 Tax 20
5 Net Profit 380
Sheet3. Master Worksheet (Need macros to produce below result)
Id Name No Revenue Expenses Gross profit Tax Net Profit
1 A 10 1000 600 400 20 380
2 B 20 900 500 400 20 380
3 A 11 950 550 400 20 380
4 B 21 950 550 400 20 380
5 C 15 800 400 400 20 380
Criterias:
Id - Should be from Sheet 1
Name - Should be from Sheet 1
No - Should be from Sheet 1
Revenue / Expenses/Gross Profit / Tax / Net Profit should be from Sheet 2 if it matches the 'ID' as in Sheet 1.