Converting rows data into columns on conditon
Solved/Closed
gd
-
Mar 29, 2011 at 03:50 AM
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 - Mar 29, 2011 at 07:53 AM
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 - Mar 29, 2011 at 07:53 AM
Related:
- How to convert row to column in notepad++
- Convert m3u to mp3 - Guide
- How to convert number to words in word - Guide
- How to open excel in notepad - Guide
- How to convert free fire id facebook to google - Guide
- How to save ping command in notepad - Guide
1 response
RWomanizer
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
120
Mar 29, 2011 at 06:09 AM
Mar 29, 2011 at 06:09 AM
supoose that your data is in sheet 1
now use the macro
and your required in now in sheet2
now use the macro
and your required in now in sheet2
Sub newRow() Dim lstRow, lstrow1 As Long Dim i, j, k As Integer Dim Str1, Str2 As String lstRow = Range("A" & Rows.Count).End(xlUp).Row For i = 1 To lstRow Str1 = Cells(i, 1).Value For j = 2 To Columns.Count Str2 = Cells(i, j).Value If Str2 <> "" Then lstrow1 = Worksheets(2).Range("A" & Rows.Count).End(xlUp).Row Worksheets(2).Cells(lstrow1, 1).Offset(1, 0).Value = Str1 Worksheets(2).Cells(lstrow1, 2).Offset(1, 0).Value = Str2 Else: GoTo 1 End If Next j 1: Next i End Sub
Mar 29, 2011 at 07:45 AM
Mar 29, 2011 at 07:53 AM