Hello I am pretty much a VBA rookie, but learning a lot in the last month so please talk to me like I am six and explain as much as possible
I had a thought about putting in a couple macros depending on if a cell is blank or has an "X" I want to have a macro ran depending on which option is used from drop-down list (which has two options, X or nothing/blank) in W7. The below is as far as I could some up with, but I am not strong enough with the VBA force to know if it is somehow possible to put that formula (please see Macro2 below) into a macro or not. If not then nothing else I say below matters as I will have to figure out another way. If it is possible how do I get all of the below to work?? lol
I want to make it so if they check a box using a pull-down and select the "X"in a certain box (W7), that it will empty another cell (T7 (T7 is actually a merged cell from T7:V7 and must stay merged)) so the user can fill in what they need to, but if they un-check the box, the formula will come back into play and run the formula to bring back what was previously there.
'Sheet1
' Private Sub Worksheet_Change(ByVal Target As Range)
' Set Target = Range("W7")
' If Target.Value = "x" Then
' Call Macro1
' End If
' If Target.Value = "" Then
' Call Macro2
' End If
'End Sub
'Module 1
'Sub Macro1()
' Sheets("Sheet1").Range("T7").ClearContents
' MsgBox Please enter your PCA in Section 3c.
'End Sub
'Sub Macro2()
' =VLOOKUP(M6,Sheet2!L3:M167,2,FALSE)
'End Sub
Thank you for your time,
Aaron
I had a thought about putting in a couple macros depending on if a cell is blank or has an "X" I want to have a macro ran depending on which option is used from drop-down list (which has two options, X or nothing/blank) in W7. The below is as far as I could some up with, but I am not strong enough with the VBA force to know if it is somehow possible to put that formula (please see Macro2 below) into a macro or not. If not then nothing else I say below matters as I will have to figure out another way. If it is possible how do I get all of the below to work?? lol
I want to make it so if they check a box using a pull-down and select the "X"in a certain box (W7), that it will empty another cell (T7 (T7 is actually a merged cell from T7:V7 and must stay merged)) so the user can fill in what they need to, but if they un-check the box, the formula will come back into play and run the formula to bring back what was previously there.
'Sheet1
' Private Sub Worksheet_Change(ByVal Target As Range)
' Set Target = Range("W7")
' If Target.Value = "x" Then
' Call Macro1
' End If
' If Target.Value = "" Then
' Call Macro2
' End If
'End Sub
'Module 1
'Sub Macro1()
' Sheets("Sheet1").Range("T7").ClearContents
' MsgBox Please enter your PCA in Section 3c.
'End Sub
'Sub Macro2()
' =VLOOKUP(M6,Sheet2!L3:M167,2,FALSE)
'End Sub
Thank you for your time,
Aaron