LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Can I use Select Case to do this?

Hi,
I guess it would be better to use Select Case statement to do this
but I don't know how I would write the code.
MyVa is a variable that contains an integer (that represents a
workday)
Thank you for your help, time & expertise.


If Range("C" & i).Value = MyVa And Range("D" & i).Value = "Ready to
ship" Then
Range("E" & i).Value = "Right on time"
End If

If Range("C" & i).Value < MyVa And Range("D" & i).Value = "Ready to
ship" Then
Range("E" & i).Value = "Missed Code Date"
End If

If Range("B" & i).Value = MyVa + 1 And Range("D" & i).Value =
"Ready to ship" Then
Range("E" & i).Value = "One day early"
End If

If Range("B" & i).Value = MyVa + 2 And Range("D" & i).Value =
"Ready to ship" Then
Range("E" & i).Value = "Two days early"
End If

If Range("B" & i).Value = MyVa And Range("D" & i).Value =
"Outstanding work" Then
Range("E" & i).Value = "One day late"
End If
 
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
Select Case jlclyde Excel Discussion (Misc queries) 5 January 6th 09 09:05 PM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
End Select without Select Case, Block If without End If errors Atreides Excel Programming 12 November 17th 06 05:10 PM
Case Select Jimbola Excel Programming 11 December 11th 05 06:45 PM


All times are GMT +1. The time now is 09:57 PM.

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

About Us

"It's about Microsoft Excel"