![]() |
function on the print area
I am trying to create a macro to find duplicated companies in a list. I have
a function which will tell me if a company is duplicated, but my problem is that it is defined on (e.g. A2:A300). I want to define the formula on the print area so that the macro can be used on any list (with any number of rows) without having to change the macro. I have tried defining it on the whole column (A:A), but I guess since it has to compare to each value, this does not work. I need a way to define a function from A2 to A"final row of print area". Can anyone help me please? |
function on the print area
Hi
Have a look at the PageSetup.PrintArea property. This will return the area for printing. -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "lil_gem" wrote: I am trying to create a macro to find duplicated companies in a list. I have a function which will tell me if a company is duplicated, but my problem is that it is defined on (e.g. A2:A300). I want to define the formula on the print area so that the macro can be used on any list (with any number of rows) without having to change the macro. I have tried defining it on the whole column (A:A), but I guess since it has to compare to each value, this does not work. I need a way to define a function from A2 to A"final row of print area". Can anyone help me please? |
All times are GMT +1. The time now is 03:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com