Create a new worksheet (excel 2003) if one or more cells in a range is not empty
if finite:
sub A()
dim i
for i=1 to 20
if thisworkbook.activeshees.cells(i,1)<"" then
thisworkbook.sheets.add.name= thisworkbook.sheets.cells(i,
1).value 'or thisworkbook.sheets.cells(i,1).text
end if
next i
Thanks for the reply !
Does this create a worksheet for every cell in the range that contains a
value ? (example : 5 cells have a value = 5 sheets added)
I would achieve the following : Example : if 8 cells in the range contain a
value, then only 1 sheet should be added (never more than 1 sheet should be
added)
Thanxxxx
Luc
|