Do while loop

  • Thread starter Thread starter Mike D.
  • Start date Start date
M

Mike D.

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.
 
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
 
Works like a charm, Mike. Thanks for your help.

Mike said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top