Hi,
I want to run this code automaticaly when value of E32 is changed. E32 is not manualy entered it is =H15. H15 is sum of some values.
This is the function I have. I tried using Worksheet_Change(ByVal Target As Range) but it didnt work. I may have done it wrong. Any help would be great. Thankyou !
Sub change()
Dim Bandwidth As Integer, Access_Type As String, Access_Bandwidth As String
Bandwidth = Sheets("Bandwidth_REQ").Range("E32").Value
If Bandwidth <= 460.8 Then
Access_Type = "BDSL"
Access_Bandwidth = "512k/512k"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 900 And Bandwidth > 460.8 Then
Access_Type = "BDSL"
Access_Bandwidth = "1M/1M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 1350 And Bandwidth > 900 Then
Access_Type = "BDSL"
Access_Bandwidth = "1.5M/1.5M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 1800 And Bandwidth > 1350 Then
Access_Type = "BDSL"
Access_Bandwidth = "2M/2M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 3600 And Bandwidth > 1800 Then
Access_Type = "BDSL"
Access_Bandwidth = "4M/4M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 5400 And Bandwidth > 3600 Then
Access_Type = "BDSL"
Access_Bandwidth = "6M/6M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 7200 And Bandwidth > 5400 Then
Access_Type = "BDSL"
Access_Bandwidth = "8M/8M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
If Bandwidth <= 1350 And Bandwidth > 900 Then
Access_Type = "BDSL"
Access_Bandwidth = "10M/10M"
Sheets("Bandwidth_REQ").Range("D33").Value = Access_Type
Sheets("Bandwidth_REQ").Range("E33").Value = Access_Bandwidth
End If
End Sub
Bookmarks