Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() All, I'm really stumped here. Need to find out the function (IF) on checking to see if a particular "Worksheet" exists. I have a macro setup to automatically CREATE new worksheets in the same workbook; however, I have another sheet that is referencing data on the new worksheets on the final worksheet. Any suggestions?? This is urgent and any info would be a great help. JP -- drvortex ------------------------------------------------------------------------ drvortex's Profile: http://www.excelforum.com/member.php...o&userid=15896 View this thread: http://www.excelforum.com/showthread...hreadid=273865 |
#2
![]() |
|||
|
|||
![]()
I don't believe you can do it as a worksheet function. You can however walk
thru the sheets collection to find a sheet name. The code listed below walks thru each worksheet and checks the name against "Sheet2". If it exists it places the sheet name in cell a1 of the active sheet. Sub findit() Dim ws As Worksheet For Each ws In Sheets If ws.Name = "Sheet2" Then [a1] = ws.Name End If Next End Sub "drvortex" wrote: All, I'm really stumped here. Need to find out the function (IF) on checking to see if a particular "Worksheet" exists. I have a macro setup to automatically CREATE new worksheets in the same workbook; however, I have another sheet that is referencing data on the new worksheets on the final worksheet. Any suggestions?? This is urgent and any info would be a great help. JP -- drvortex ------------------------------------------------------------------------ drvortex's Profile: http://www.excelforum.com/member.php...o&userid=15896 View this thread: http://www.excelforum.com/showthread...hreadid=273865 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
copyright and worksheet protection | Excel Discussion (Misc queries) | |||
Executing macro for all worksheet from a different worksheet | New Users to Excel | |||
Reference Data in Moved Worksheet | Setting up and Configuration of Excel | |||
Worksheet name and Backward compatibility | Excel Discussion (Misc queries) |