copy and paste into new worksheet

October 5, 2011 at 07:38:01
Specs: Windows 7
Hello everyone
I have one workbook i have sheet 1 is collecting data and sheet 2 with is used and an active worksheet. I am using a code that is copying from sheet 1 if it finds in column 15(O) if it finds the text (Req.Feed Set up) and moves it to sheet 2. I work OK but my issue is that i cannot skip rows that are blank it only goes up to the last Text that contains (req.Feed set up) I would like to go thru each cell and skip and blanks until it find Req. feed Set Up Then copy paste into sheet 2 and delete from sheet 1
Please Help I would be so thankful
My e-mail is xxx@xxx.xxx

edited by moderator: email address deleted


See More: copy and paste into new worksheet

Report •


#1
October 5, 2011 at 13:18:48
First, a posting tip:

You should never post your email address in plain text in a public forum.

It's not that we care whether or not you get a lot of spam, it's that we don't want to be known as a site where email addresses can be harvested. Once the bad guys start hanging around, our website will be subject to all sorts of security issues.

I have edited your post to remove the email address. If you need to send your email address to another member, please use the Private Message feature of this website.

Second,

It's a little tough for us to answer your question without seeing the code that you are trying to use. It might be that all that is needed is minor change, so before we try to write all new code for you, why don't you post the code that you are using now?

Before posting the code, please click on the following line and read the instructions on how to post code in this forum.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
October 6, 2011 at 06:12:00
Alright I didnt Knoe I just need this answered quickly

Column O
Action
Req. Feed Set Up
Req. Feed Set Up
(blank Cell)
Req. Feed Set Up

Sub Feed_set_up()
'Let's start at row 2. Row 1 has headers
x = 3
'Start the loop
Do While Cells(x, 15) <> ""
'Look for data with 'Feed set up'
If Cells(x, 15) = "Req. Feed Set Up" Then
'copy the row if it contains '
Worksheets("Sheet1").Rows(x).Copy
'Go to sheet2. Activate it. We want the data here
Worksheets("Sheet2").Activate
'Find the first empty row in sheet2
erow = Sheet2.Cells(Rows.Count, 15).End(xlUp).Offset(1, 0).Row
'Paste the data here
ActiveSheet.Paste Destination:=Worksheets("Sheet2").Rows(erow)
End If
'go to sheet1 again and actvate it
Worksheets("Sheet1").Activate
'Loop through the other rows with data
x = x + 1
Loop
End Sub

Above is the code that i am using to run the macro,
I realized that i do not want to copy the entire row I want to Only Copy every column Until column W because I realize once the data is moved to Sheet 2 it removes other information i need.



Report •

#3
October 6, 2011 at 07:20:32
re: "Alright I didnt Knoe I just need this answered quickly"

Well, the more details you provide, the quicker we can answer your question. Since we can't see your workbook from where we're sitting, we can't be of much help without some details as to what youa re doing.

Did you see my request to read the instructions on how to post code in this forum?

Click on the following line and then repost your code.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
October 6, 2011 at 07:31:27
Do you know the answer or not? You can see my Code that im using and a explaintion of what is that im trying to do. I really would be thankful if you guys would help but i dont have time with the back and fourth.

Report •

#5
October 6, 2011 at 07:58:25
I dont mean to come off rude im just would like to get the answer to this problem rather quickly what i am trying to get done is the following

O
Action
Req.Feed Set Up

This is a column I have in Sheet1 ( the sheet is not named) In this sheet I have or will have 10,000 records of names of clients and the status they hold with company
What i would like to have done is a everytime Reg.feed Set up is found in the Column O is that column A-W is copied and moved to sheet 2 (which is also not named). The promblem that i am having with the current code is that is does not skip blank cells data as to be in every cell of that column in order for it to keep moving down the column.


Here is the code

Sub Feed_set_up()
'Let's start at row 2. Row 1 has headers
x = 3
'Start the loop
Do While Cells(x, 15) <> ""
'Look for data with 'Feed set up'
If Cells(x, 15) = "Req. Feed Set Up" Then
'copy the row if it contains '
Worksheets("Sheet1").Rows(x).Copy
'Go to sheet2. Activate it. We want the data here
Worksheets("Sheet2").Activate
'Find the first empty row in sheet2
erow = Sheet2.Cells(Rows.Count, 15).End(xlUp).Offset(1, 0).Row
'Paste the data here
ActiveSheet.Paste Destination:=Worksheets("Sheet2").Rows(erow)
End If
'go to sheet1 again and actvate it
Worksheets("Sheet1").Activate
'Loop through the other rows with data
x = x + 1
Loop
End Sub

If there a way to solve this problem I really would be sooo thankful

Sandy


Report •

#6
October 6, 2011 at 09:05:18
Please do not post your question more than once.

I have deleted your most recent duplicate post.

re: "I really would be thankful if you guys would help but i dont have time with the back and fourth."

We are all volunteers here, working in our free time to offer help to members such as yourself. If you don't have time for "the back and forth" then perhaps you should hire someone who, for a price, will work on your problem in the timeframe that fits your needs.

If you want free help, then follow the instructions requested by those that respond to your questions and wait (patiently) for an answer.

If you don't want to do what we ask - which will make our job easier, therefore making it easier to help you - then perhaps you should be looking elsewhere for assistance.

DerbyDad03
Office Forum Moderator

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#7
October 6, 2011 at 09:31:37
Ok, DerbyDad03
Thanks

Report •


Ask Question