cityanangelstx2004
Board Regular
- Joined
- Jun 18, 2004
- Messages
- 56
I have two columns in my excel spreadsheet that I would like to include the following select case statement. One is for regular hours and the other is for total hours. Does anyone know how I can loop the select case statement for each column so that this covers cells g13:g28 and the next select statement covers o1328. Once this is achieved how would I combine the two select statements under the same sub routine.
Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
'Regular Hours for the range g13:g28
Select Case Range("s13").Value
Case Is > 0
Range("g13").Value = Range("t13").Value
Case Else
Range("g13").Value = Range("u13").Value
End Select
'Total Hours for the range o1328
Select Case Range("u13").Value
Case Is > 0
Range("o13").Value = Range("u13").Value
Case Else
Range("o13").Value = ""
End Select
Any help is appreciated. Thank you in advance.
Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
'Regular Hours for the range g13:g28
Select Case Range("s13").Value
Case Is > 0
Range("g13").Value = Range("t13").Value
Case Else
Range("g13").Value = Range("u13").Value
End Select
'Total Hours for the range o1328
Select Case Range("u13").Value
Case Is > 0
Range("o13").Value = Range("u13").Value
Case Else
Range("o13").Value = ""
End Select
Any help is appreciated. Thank you in advance.