Home |
Search |
Today's Posts |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Harald Staff wrote:
"witek" skrev i melding ... Harald Staff wrote: "witek" skrev i melding ... If ws.Name = "X" Or ws.Name = "Y" Or ws.Name = "Z" Then AND not OR If ws.Name < "X" AND ws.Name < "Y" AND ws.Name < "Z" No. A ws can not have three names at the same time so that test will always fail. try what is value of ws.Name < "X" AND ws.Name < "Y" AND ws.Name < "Z" if ws.Name = "T" . Sorry, you're right. It stated "AND not OR", but not "< not =" , so I misread it. But it leaves the question why this? Does it perform better than the original, or than a Select Case, or three If's ? no difference between ifs. simply if with empty then clause does not look good. select case can be a little bit faster because once case is found it jumps out of select case statement. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop several sheets - not all worksheets of workbook | Excel Programming | |||
Master's please help me with my code; Doing a loop to copy valuesfrom a series Sheets of another workbook.. | Excel Programming | |||
apply Macro to all sheets in workbook - loop | Excel Programming | |||
Skip LOC in D While Loop | Excel Programming | |||
Loop through all sheets in workbook | Excel Programming |