![]() |
split range of numbers in two columns to as many as numbers in ran
i have two columns with the range of numbers
like 12 23 24 35 36 47 i need to brake each row so it will be 12 13 14 PLS Help |
split range of numbers in two columns to as many as numbers in ran
I'm not qute sure what you are asking for;
but try selecting the second column then put your pointer over part of the border of your selection, then press and hold the left mouse button and drag the selection down to the bottom of the first list in the first column. Now you have one big list, then apply an auto filter using Data|Filter|Auto Filter, press the drop down arrow and select acsending order? "arsovat" wrote: i have two columns with the range of numbers like 12 23 24 35 36 47 i need to brake each row so it will be 12 13 14 PLS Help |
split range of numbers in two columns to as many as numbers in ran
arsovat,
Select 1 column by however many rows you have (for your example, 3 rows: the cells with 12, 24, and 36), then run the macro below. HTH, Bernie MS Excel MVP Sub TryNow() Dim myRow As Long Dim myR As Range Dim myC As Range Dim i As Long Set myR = Selection If myR.Columns.Count 1 Then Exit Sub With Application ..EnableEvents = False ..ScreenUpdating = False End With For myRow = myR.Cells(myR.Rows.Count).Row To _ myR.Cells(1).Row Step -1 For i = Cells(myRow, myR.Column).Value + 1 To _ Cells(myRow, myR.Column + 1).Value Cells(myRow, myR.Column).EntireRow.Copy Cells(myRow, myR.Column).Insert Next i Set myC = Cells(myRow, myR.Column).Resize(Cells(myRow, _ myR.Column + 1) - Cells(myRow, myR.Column).Value + 1) myC.Formula = "=" & Cells(myRow, myR.Column).Value & _ " + ROW()-ROW(" & Cells(myRow, myR.Column).Address & ")" myC.Copy myC.PasteSpecial xlPasteValues Next myRow myR.Offset(0, 1).EntireColumn.Delete myR.Cells(1).Select With Application ..EnableEvents = True ..ScreenUpdating = True End With End Sub "arsovat" wrote in message ... i have two columns with the range of numbers like 12 23 24 35 36 47 i need to brake each row so it will be 12 13 14 PLS Help |
All times are GMT +1. The time now is 09:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com