Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop to Filter, Name Sheets. If Blank, Exit Loop ryguy7272 Excel Programming 3 February 5th 08 03:41 PM
Naming Worksheets - Loop within a loop issue klysell Excel Programming 0 March 27th 07 11:17 PM
(Complex) Loop within loop to create worksheets klysell Excel Programming 1 March 20th 07 12:03 AM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"