alozano
06-09-2015, 12:05 PM
Hello All,
I've done basic VBA coding in college but we didn't really focus on VBA excel. I'm trying to create an automatic fill up macro based on data.
So my starting point, I'm already stuck!
The plan is based on the "X" category, the value of Y and Z will pop up on a daily basis on another worksheet..
I'm trying to do something simple for now but can't seem to grasp it..
Private Sub CommandButton21_Click()
Dim x As String
Dim y As String
Dim z As String
x = Range("C:C").Value
y = Range("D:D").Value
z = Range("A:A").Value
If x = "Office" Then y = z
End Sub
So the main code i'm stuck at is , if the X range is saying "Office" on the Y column, it should populate the Z value?
Thanks in advance !
I've done basic VBA coding in college but we didn't really focus on VBA excel. I'm trying to create an automatic fill up macro based on data.
So my starting point, I'm already stuck!
The plan is based on the "X" category, the value of Y and Z will pop up on a daily basis on another worksheet..
I'm trying to do something simple for now but can't seem to grasp it..
Private Sub CommandButton21_Click()
Dim x As String
Dim y As String
Dim z As String
x = Range("C:C").Value
y = Range("D:D").Value
z = Range("A:A").Value
If x = "Office" Then y = z
End Sub
So the main code i'm stuck at is , if the X range is saying "Office" on the Y column, it should populate the Z value?
Thanks in advance !