• 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.

how to create new worksheet of selected cols or rows.

I'm afraid you're going to have to give more details than that for us to give an answer. All I was able to understand was that you want to create a new worksheet. What are we doing with "selected cols and rows"?
 
suppose.....in my sheet1 i have data from A1:M255

Now if i select data B1:E50 then i want these data can be in another new workbook...(when executing macros)
 
Are we...
  • copying all of B1:E50 into a new workbook, same sheet?
  • A new workbook, with new sheet for each row?
  • A new workbook, with new sheet for each column?
  • Should the copying happen as soon as you select the data, or do you want to run the macro/hit a button?
 
This will do what you asked.
Code:
Sub MakeNew()
Dim selRange As Range
Set selRange = Selection
Application.Workbooks.Add
selRange.Copy ActiveSheet.Cells(1, 1)
End Sub
 
Back
Top