Hi to all,
i have data like this
A B
MB1 MB1-1
MB2
MB3
MB4
MB5
i want to paste text for MB1 in column B like from MB1-1 to MB1-20 and MB 2-1 to MB 2-20. for MB2 in cloumn B like MB2 1-2 to MB2 1-20 and MB2 2-1 and MB2 2-20.
I am expecting like this
A B
MB1 MB1 1-1
.
.
.
MB1 1-20
MB1 2-1
.
.
.
MB1 2-20
MB2 MB2 1-1
.
.
.
MB2 1-20
MB2 2-1
.
.
.
MB2 2-20
and i would like to continue this for the rest of text in column A and i want this 20 in 1-1 or 2-20 should be changable because this 20 texts are not contstant numbers for always.
Here i tried with commond button simple and now i am in position to paste text in a given range but not the way i am expecting.
here is my code
Private Sub CommandButton1_click()
Dim Text As String
Text = "MB1 1-1"
Range ("B1:B20").value =Text
End Sub
I need to sovle this problem or needs editing to this VBA code to reach my objective. any help would be appreciated
Thanking you
i have data like this
A B
MB1 MB1-1
MB2
MB3
MB4
MB5
i want to paste text for MB1 in column B like from MB1-1 to MB1-20 and MB 2-1 to MB 2-20. for MB2 in cloumn B like MB2 1-2 to MB2 1-20 and MB2 2-1 and MB2 2-20.
I am expecting like this
A B
MB1 MB1 1-1
.
.
.
MB1 1-20
MB1 2-1
.
.
.
MB1 2-20
MB2 MB2 1-1
.
.
.
MB2 1-20
MB2 2-1
.
.
.
MB2 2-20
and i would like to continue this for the rest of text in column A and i want this 20 in 1-1 or 2-20 should be changable because this 20 texts are not contstant numbers for always.
Here i tried with commond button simple and now i am in position to paste text in a given range but not the way i am expecting.
here is my code
Private Sub CommandButton1_click()
Dim Text As String
Text = "MB1 1-1"
Range ("B1:B20").value =Text
End Sub
I need to sovle this problem or needs editing to this VBA code to reach my objective. any help would be appreciated
Thanking you