![]() |
Do while loop
I am trying to excercise a loop. I have a series of copy and paste commands
that I want to exercise if cells(i,1) is any of 9 text values (Cos, DL, MRB, Swap, Finishing, DST2,Fin-T,Pre-T,Trap). Is there an easy way to do those either than 9 "IF" statements? Thanks, Mike. |
Do while loop
What about a select case statement instead, like so:
Select Case cells(i,1) Case "Cos", "DL", "MRB", "Swap", "Finishing", "DST2", "Fin-T", "Pre-T", "Trap" 'DO PASTING OPERATION HERE End Select "Mike D." wrote: I am trying to excercise a loop. I have a series of copy and paste commands that I want to exercise if cells(i,1) is any of 9 text values (Cos, DL, MRB, Swap, Finishing, DST2,Fin-T,Pre-T,Trap). Is there an easy way to do those either than 9 "IF" statements? Thanks, Mike. |
Do while loop
Works like a charm, Mike. Thanks for your help.
"Mike" wrote: What about a select case statement instead, like so: Select Case cells(i,1) Case "Cos", "DL", "MRB", "Swap", "Finishing", "DST2", "Fin-T", "Pre-T", "Trap" 'DO PASTING OPERATION HERE End Select "Mike D." wrote: I am trying to excercise a loop. I have a series of copy and paste commands that I want to exercise if cells(i,1) is any of 9 text values (Cos, DL, MRB, Swap, Finishing, DST2,Fin-T,Pre-T,Trap). Is there an easy way to do those either than 9 "IF" statements? Thanks, Mike. |
All times are GMT +1. The time now is 01:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com