DjTRex2002
New Member
- Joined
- Mar 22, 2024
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
Hello, ok so far I am barely learning how to write code by doing a lot of searching on google lol. I wanted to see if you could help me with the following ... I am trying to change the Sheet Tab by getting information from Cell B, which works great and the code is ...
Also have the following to return a blank cell to formula ...
However, I do not know how to combine the two codes. It gives me an error ...
Also, can the formula to return on a blank cell be "=IF(F17<>"",VLOOKUP(F17,Parts!$A:$C,2,FALSE),"")" instead of "=A10*B10"?
Thank you
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Updated by Extendoffice 20230130
On Error Resume Next
If Not Intersect(Target, Range("B3")) Is Nothing Then
ActiveSheet.Name = ActiveSheet.Range("B3")
ElseIf Not Intersect(Target.Dependents, Range("B3")) Then
ActiveSheet.Name = ActiveSheet.Range("B3")
End If
End Sub
Also have the following to return a blank cell to formula ...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("C9").Value = "" Then
Range("C9").Formula = "=A9*B9"
End If
If Range("C10").Value = "" Then
Range("C10").Formula = "=A10*B10"
End If
End Sub
However, I do not know how to combine the two codes. It gives me an error ...
Also, can the formula to return on a blank cell be "=IF(F17<>"",VLOOKUP(F17,Parts!$A:$C,2,FALSE),"")" instead of "=A10*B10"?
Thank you