Learn when you want, where you want with convenient online training courses. Sign up now!
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.
Public Sub CommandButton1_Click()
Dim I As Long, lastrow As Long
Dim t As Long
Dim h As Long
Dim nr As Long
Dim lastcol As Long
Dim firstSelectionRow As Long
Dim firstDataCol As Long
Dim outputLastRow As Long
Dim outputSheet As String
outputSheet = "Sheet2"
lastrow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
lastcol = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column
For I = 1 To lastrow
If Cells(I, 1) <> "" Then
firstSelectionRow = I + 1
For I = 1 To lastcol
If Cells(1, I) <> "" Then
firstDataCol = I
outputLastRow = 1
For I = firstSelectionRow To lastrow
For h = 1 To firstDataCol - 1
Sheets(outputSheet).Cells(outputLastRow, h).Value = Cells(I, h).Value
For t = firstDataCol To lastcol
If UCase(Cells(I, t).Value) = "X" Then
For nr = 1 To firstSelectionRow - 2
Sheets(outputSheet).Cells(outputLastRow, nr + firstDataCol - 1) = Cells(nr, t).Value
outputLastRow = outputLastRow + 1
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.