• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Export Data on new Sheet with same Id of that column

randhawa_125

New Member
First of all let me tell you all that i am totally new to Excel. I never used it before.. I am in a little trouble, so i need help of your guyz... Hope you guyz will help me.

My Problem is :
Untitled2.png
I have two columns "Sr.No" and "Previous Posting" as showing in the image 1 (Current Situation). Sr.No columns contains numbers in series and "Previous posting" contains all the posting details in the same column but in different rows..

Now i want to save all these posting details in a new sheet but not in a single column. Every posting detail should be in a new row with same Serial Number which belongs to that column, rather than all the posting record in a single column.

Results should be like as showing in image 2:

I hope you will understand my question and suggest me how to do this as i am totally new.
 

Attachments

Cross posts:
http://stackoverflow.com/questions/28642162/export-data-on-new-sheet-with-same-id-of-that-column
http://www.codeproject.com/Questions/878675/Export-Data-on-new-Sheet-with-same-Id-of-that-colu

randhawa_123, please have aread of http://www.excelguru.ca/content.php?184
It's important.

Attached is a file with a button in the vicinity of cell C1. Clicking it runs a small macro, this one:
Code:
Sub blah()
Range("A:A,M:M").Copy
With Sheets.Add 'adds a new sheet.
  .Range("A1").PasteSpecial Paste:=xlPasteValues 'pastes the data.
  .UsedRange.Columns("A:A").SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C" 'adds a formula in the blank cells of column A.
  .UsedRange.Columns("A:A").Value = .Columns("A:A").Value 'converts the results of those formula to plain values.
  .UsedRange.Columns("B:B").SpecialCells(xlCellTypeBlanks).EntireRow.Delete 'deletes the entire row if there's a blank in column B.
' now to remove the numbers before the colon in each cell in column B:
  For Each cll In .UsedRange.Columns("B:B").Cells
    yy = Split(cll.Value, ": ")
    If UBound(yy) = 1 Then cll.Value = yy(1)
  Next cll
  .UsedRange.Columns.AutoFit 'adjusts column widths.
  Application.Goto .Cells(1) 'selects the cell A1 of the new sheet.
End With
End Sub
 

Attachments

Back
Top