ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cicling sheets (https://www.excelbanter.com/excel-programming/341237-cicling-sheets.html)

sal21[_75_]

cicling sheets
 

this is my old code to cicling sheet in numeric name...(4500,4501,450
ecc...)
Now my actual format name of sheet is: 4543-018769, 4543-008356
ecc...
How to mofify this code?

Sub LOOPSHEET()
Application.ScreenUpdating = False

Dim i As Long
For i = 1 To Sheets.Count
If IsNumeric(Sheets(i).Name) Then
Sheets(i).Select
Call ESTRATTI_CICSEA
End If
Next 'i
Worksheets("SALDI").Select
Application.ScreenUpdating = True
End Su

--
sal2

-----------------------------------------------------------------------
sal21's Profile: http://www.excelforum.com/member.php...nfo&userid=204
View this thread: http://www.excelforum.com/showthread.php?threadid=47111


Tom Ogilvy

cicling sheets
 
Sub LOOPSHEET()
Application.ScreenUpdating = False

Dim i As Long
For i = 1 To Sheets.Count
If IsNumeric(Replace(Sheets(i).Name,"-","")) Then
Sheets(i).Select
Call ESTRATTI_CICSEA
End If
Next 'i
Worksheets("SALDI").Select
Application.ScreenUpdating = True
End Sub

Should work in xl2000 or later

--
Regards,
Tom Ogilvy


"sal21" wrote in
message ...

this is my old code to cicling sheet in numeric name...(4500,4501,4503
ecc...)
Now my actual format name of sheet is: 4543-018769, 4543-008356,
ecc...
How to mofify this code?

Sub LOOPSHEET()
Application.ScreenUpdating = False

Dim i As Long
For i = 1 To Sheets.Count
If IsNumeric(Sheets(i).Name) Then
Sheets(i).Select
Call ESTRATTI_CICSEA
End If
Next 'i
Worksheets("SALDI").Select
Application.ScreenUpdating = True
End Sub


--
sal21


------------------------------------------------------------------------
sal21's Profile:

http://www.excelforum.com/member.php...fo&userid=2040
View this thread: http://www.excelforum.com/showthread...hreadid=471117





All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com