Hello! Heard a lot of good things about this forum and had a macro question that I was hoping someone could help me on.
I have spreadsheets where countries are listed from B2 down and data on these countries are listed in the columns across, and with totals at the bottom.
Countries data1 data2 data3
a x x x
b x x x
c x x x
Total x x x
I am making a macro to format this to look like this:
Countries data1 data2 data3
a x x x
b x x x
c x x x
Total x x x
using borders, but since the number of countries changes every week, I dont know how to get the macro to find the last line and place a border above it (or the 2nd last line and place a border below it would work too I guess).
The second thing is, I already have an existing macro that does other formatting. Is it possible to take this macro and place it in the middle of the existing macro? Thank you very much for your help!
edit: err formatting didn't work but I hope you get the picutre. the x are for the data values and the 2nd line should extend to the end
I have spreadsheets where countries are listed from B2 down and data on these countries are listed in the columns across, and with totals at the bottom.
Countries data1 data2 data3
a x x x
b x x x
c x x x
Total x x x
I am making a macro to format this to look like this:
Countries data1 data2 data3
a x x x
b x x x
c x x x
Total x x x
using borders, but since the number of countries changes every week, I dont know how to get the macro to find the last line and place a border above it (or the 2nd last line and place a border below it would work too I guess).
The second thing is, I already have an existing macro that does other formatting. Is it possible to take this macro and place it in the middle of the existing macro? Thank you very much for your help!
edit: err formatting didn't work but I hope you get the picutre. the x are for the data values and the 2nd line should extend to the end
Last edited: