View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default Check for two sheets. Add or subtract as necessary.


HI

I'm hoping someone can help with a short routine.

I need to check that there are 2 worksheets present in the workbook.

If there is only one , then a second has to be added to the end.

So tabs :

Sheet1

Becomes

Sheet1 Sheet2


If there are more than 2 then the additional ones should be deleted form
the end.

So tabs:

Sheet1 Sheet2 Sheet3 ...

Becomes

Sheet1 Sheet2



Grateful for your help.



Best Wishes