Hello, Here is the VBA code to match a string and print the result. [code] Sub sbMatchStringInColumn() lRow...
Hi Lora, Here is the vba code to rename all folders in root folder form existing name to new name. ...
Hello, Please see the below macro, it will clear the data in the B if they have more rows...
Hello Lora,Please check below procedures, I hope one of this will help to solve your query.You can get the Active...
You're welcome..You can delete this lineThen format it as you wishor replace the previous line with the proper format
You are awesome, it works perfectly. Only issue is that the Date format in the Output Sheet is coming in...
Hello Try this code [code] Sub Test() Dim a As Variant Dim b As Variant Dim i As Long Dim...
It is not totally clear for me ..
What is wrong with this code?
Dim lrow As Integer
lrow = ThisWorkbook.Sheets("SHEET1").Cells(Rows.Count, 11).End(xlUp).row
Dim row As Integer
Dim srow As Integer
Dim hrow As Integer
srow = 5
row = 5
hrow = 1
Do While Cells(row, 11) <> ""
Cells(row, 13) = Cells(row, 11)
row = row + 1
Do While Cells(srow, 12) <> ""
Cells(lrow + hrow, 13) = Cells(srow, 12)
srow = srow + 1
hrow = hrow + 1
Welcome to our Forum.
The issues in you code are ,:
Please see the below code to concatenate note stings in two columns:
Dim StartRow As Integer
Dim LastRow As Integer
LastRow = ThisWorkbook.Sheets("SHEET1").Cells(Rows.Count, 11).End(xlUp).row
StartRow = 5
Do While StartRow <= LastRow
Cells(StartRow, 13) = Cells(StartRow, 11) & " " & Cells(StartRow, 12)
StartRow = StartRow + 1
Hope this helps!
Thank you for your quick response but iam not looking to concatenate …iam looking it put them in one single column one after the other,,,if a column has names a,b,c,d,e…till some row and another column has w,x,y,z then when i click a button my thrd column should have a,b,c,d,e,w,x,y,z in one single column
Thanks, now I understand your requirement, after reading your example. Please check the below procedure:
Dim iCntr, startRow, lrowCol1, lrowCol2, cntrCol3 As Integer
startRow = 5
cntrCol3 = startRow
'Check the last row in Column 11 and enter them in column 13
lrowCol1 = ThisWorkbook.Sheets("SHEET1").Cells(Rows.Count, 11).End(xlUp).Row
For iCntr = startRow To lrowCol1
If Trim(Cells(iCntr, 11)) <> "" Then
Cells(cntrCol3, 13) = Cells(iCntr, 11)
cntrCol3 = cntrCol3 + 1
'Check the last row in Column 12 and append them in column 13
lrowCol2 = ThisWorkbook.Sheets("SHEET1").Cells(Rows.Count, 12).End(xlUp).Row
For iCntr = startRow To lrowCol2
If Trim(Cells(iCntr, 12)) <> "" Then
Cells(cntrCol3, 13) = Cells(iCntr, 12)
cntrCol3 = cntrCol3 + 1
Please share using the share button above.
If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.
Found the answer useful and wants to credit the user, then vote the answer (vote up).