Private Sub CommandButton1_Click() RowCount = ActiveWorkbook.Worksheets("Sheet1").Range("A2", Worksheets("Sheet1").Range("A2").End(xlDown)).Rows.Count ColomCount = ActiveWorkbook.Worksheets("Sheet1").Range("A2", Worksheets("Sheet1").Range("A2").End(xlDown)).Columns.Count For i = 2 To RowCount For j = 1 To ColomCount 'MsgBox (RowCount) 'MsgBox (ColomCount) 'If Not Sheet1.Cells(i, j).Value = vbNullString Then 'varConctnt = Sheet1.Cells(i, j).Value & " or " & Sheet1.Cells(i + 1, j).Value Sheet1.Cells(2, 2) = Sheet1.Cells(i, j).Value & " or " & Sheet1.Cells(i + 1, j).Value 'End If Next j 'If varConctnt = vbNullString Then MsgBox "Empty Array": 'GoTo skip1 'Sheet1.Cells(2, 2) = varConctnt 'varConctnt = "" 'skip1: Next i End Sub
Sheet1.Cells(2, 2)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)