This should work
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E1:E10")) Is Nothing Then
With Target
Select Case .Value
Case Is <= 365
.Offset(0, 1).Value = "0 Weeks"
Case Is <= 730
.Offset(0, 1).Value = "1 Weeks"
Case Is <= 1825
.Offset(0, 1).Value = "2 Weeks"
Case Is <= 3650
.Offset(0, 1).Value = "3 Weeks"
Case Is 3650
.Offset(0, 1).Value = "4 Weeks"
End Select
End With
End If
End Sub
"RRyan" wrote:
I'm trying to build a vacation tracker but i don't know VB. Is there a way
to get muliple if statements using the function built into excel? This is
what I would ike to use:
If (e) <= (365) Then
(f)= "0 Weeks"
End If
if (e) (365) and <= (730) then
(f) = "1 week"
End If
if (e) (730) and <= (1825) then
(f) = "2 Weeks"
End If
if (e) (1825) and <= (3650) then
(f) = "3 Weeks"
End If
If (e) (3650) Then
(f) = "4 Weeks"
End If
(e) and (f) are the columns
Thanks in advance
Rob