F
flashdavies
Hi
I would like to be able to compare data between two tables. Each table
contains around 60 brands; however,the exact number of brands varies
month to month, but the top brands are always there.
This is the data I have each month:
Column 1 = rank
Column 2 = brand
Column 3 = points (relates to performance)
But I would like to compare the month with the previous month and for
this I need to include two more columns:
Column 4 = percentage change
Column 5 = rank last month
I have been calculating the figure for columns 4 & 5 with formulas one
at a time. Can anyone suggest how I might automate the task, most
likely by using a macro?
Typically I paste the data onto different worksheets (but they don't
have to be, if that makes it any easier -- they could be on the same
worksheet).
Here is a sample to illustrate the data I need to compare (I have used
commas instead of columns in this example).
Worksheet 1 - June
1,GM,10000
2,Toyota,9000
3,Ford,8900
[etc - up to 60 brands]
Worksheet 2 - May
1,GM,9800
2,Ford,9000
3,Toyota,8000
If I had the same brands and the same number of brands each month, I
would just sort them alphabetically and use a formula to compare, but
this doesn't work for me because the number of brands can change.
However the top brands do remain, and they are the ones I am
interested in.
At the moment I do this.
a = Toyota in June
b = Toyota in May
Percentage change = (a-b)/b
I think I need some kind of loop macro that stars with one of the
brands in one list, then searches for the brand int the other list,
and then performs the calcution.
I am trying to learn about macro's at the moment but I don't know
quite enough yet to create what I need.
Regards,
Harry
I would like to be able to compare data between two tables. Each table
contains around 60 brands; however,the exact number of brands varies
month to month, but the top brands are always there.
This is the data I have each month:
Column 1 = rank
Column 2 = brand
Column 3 = points (relates to performance)
But I would like to compare the month with the previous month and for
this I need to include two more columns:
Column 4 = percentage change
Column 5 = rank last month
I have been calculating the figure for columns 4 & 5 with formulas one
at a time. Can anyone suggest how I might automate the task, most
likely by using a macro?
Typically I paste the data onto different worksheets (but they don't
have to be, if that makes it any easier -- they could be on the same
worksheet).
Here is a sample to illustrate the data I need to compare (I have used
commas instead of columns in this example).
Worksheet 1 - June
1,GM,10000
2,Toyota,9000
3,Ford,8900
[etc - up to 60 brands]
Worksheet 2 - May
1,GM,9800
2,Ford,9000
3,Toyota,8000
If I had the same brands and the same number of brands each month, I
would just sort them alphabetically and use a formula to compare, but
this doesn't work for me because the number of brands can change.
However the top brands do remain, and they are the ones I am
interested in.
At the moment I do this.
a = Toyota in June
b = Toyota in May
Percentage change = (a-b)/b
I think I need some kind of loop macro that stars with one of the
brands in one list, then searches for the brand int the other list,
and then performs the calcution.
I am trying to learn about macro's at the moment but I don't know
quite enough yet to create what I need.
Regards,
Harry