+ Reply to Thread
Results 1 to 16 of 16

copy row to new sheet if criteria met

  1. #1
    Registered User
    Join Date
    12-01-2015
    Location
    ballarat
    MS-Off Ver
    2013
    Posts
    85

    copy row to new sheet if criteria met

    Hello,
    I am hoping someone may be able to assist me with my project please.
    In sheet1 I have data which I paste daily in cols A-R which is the heading and cols B-R which has the data, and in Col S and Col T I have formulas which result in placing a”Yes” if criteria is met.
    In sheet2 I have data I have data which I paste daily in cols A-R which is the heading and cols B-R which has the data in cols A-R
    and in Col S I have a formula which results in placing a”Yes” if criteria is met.
    Now what I wish to be able to do is copy the complete row of any from sheet1 ColS , ColT,sheet2 ColS
    that have “Yes” entered as a result of the formula into sheet3.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: copy row to new sheet if criteria met

    Hello gilnic,

    Forum Members do not usually feel inclined to create a Workbook or Sheet to replicate your layout.

    Please attach a sample workbook.

    Make sure there is just enough data to demonstrate your need.

    Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    12-01-2015
    Location
    ballarat
    MS-Off Ver
    2013
    Posts
    85

    Re: copy row to new sheet if criteria met

    Hello Winon,
    Thank you for your assistance.
    Sample sheet attached. Sheet 1 and 2 has the data and sheet 3 is where I wish to have the rows copied to if criteria met.
    Attached Files Attached Files

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: copy row to new sheet if criteria met

    Any reason why in Sheet1 your pasted info starts in Column Oval and not under Column Date

    If it was copied under the incorrect column...Then this should work...
    Please Login or Register  to view this content.
    Edit
    If it is supposed to be like attached file then a bit more tricky....
    Please Login or Register  to view this content.
    Last edited by sintek; 12-30-2017 at 09:12 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    12-01-2015
    Location
    ballarat
    MS-Off Ver
    2013
    Posts
    85

    Re: copy row to new sheet if criteria met

    Hello sintek,
    Thank you for prompt response.For some reason when I copy and paste the table from the website
    it ended up as per sheet1 with the data out of line with the headings.I have been trying to correct this and just recently
    have improved the copy situation but while the data is aligned with the heading it now leaves Column A blank.
    I have attached an updated sample sheet.Of course this is a small sample and the data would normally extends down the rows.
    Apologies for messing you around.
    Attached Files Attached Files

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: copy row to new sheet if criteria met

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-01-2015
    Location
    ballarat
    MS-Off Ver
    2013
    Posts
    85

    Re: copy row to new sheet if criteria met

    Hello Sintek,
    Thank you for providing the code for me. This is nearly exactly what I was looking for. When I run the sample there appears to be two differences.
    1. It transfers the first row of sheet 1 and sheet 2 to sheet3 even though it does not have “Yes” in the column S in sheet1 or S or T in sheet2.
    2. In sheet1 if there is only an entry in column T and not in S it does not transfer the row to sheet3.
    Attached Files Attached Files

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: copy row to new sheet if criteria met

    Hi gilnic...So are you saying that Sheet1 Col S & Col T (Both) must have "Yes" in before copy over....
    Last edited by sintek; 12-31-2017 at 12:13 PM.

  9. #9
    Registered User
    Join Date
    12-01-2015
    Location
    ballarat
    MS-Off Ver
    2013
    Posts
    85

    Re: copy row to new sheet if criteria met

    Hello sintek,
    Yes" only has to be in either S or T in sheet1 to be copied to sheet3."Yes" can end up being either only in Col S or ColT or it can be in both as per sample2 sheet.
    What the code was doing was not transferring the row with "Yes" if it was only in col T.In the sample sheet white and aqua have "Yes" only in col T and they have not been copied.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: copy row to new sheet if criteria met

    Try
    Please Login or Register  to view this content.
    Last edited by jindon; 12-31-2017 at 07:38 PM.

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: copy row to new sheet if criteria met

    My spin...Not as advanced as jindon...Thankfully this is how we all learn...
    A little bit faster I think
    Please Login or Register  to view this content.
    Last edited by sintek; 12-31-2017 at 12:07 PM.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: copy row to new sheet if criteria met

    Quote Originally Posted by sintek View Post
    A little bit faster I think
    I don't agree with you.
    Just a matter of Screen updating and now mine is a bit faster.

  13. #13
    Registered User
    Join Date
    12-01-2015
    Location
    ballarat
    MS-Off Ver
    2013
    Posts
    85

    Re: copy row to new sheet if criteria met

    Hello,
    Well there you are,I now have two excellent solutions to my query.
    I would like to thank sintek for continued efforts to provide me with the solution I was hoping for.
    I would also like to thank jindon for providing me with an alternate solution.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: copy row to new sheet if criteria met

    Quote Originally Posted by gilnic View Post
    I would also like to thank jindon for providing me with an alternate solution.
    I've posted my code just because sintek will not be able to solve the problem, that's all.

  15. #15
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: copy row to new sheet if criteria met

    just because sintek will not be able to solve the problem
    Perhaps....just in case or a better solution which will allow you and sintek both to learn

    Thanks gilnic for rep ...Glad we could assist.

  16. #16
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: copy row to new sheet if criteria met

    @ jidon,

    Hello jindon,

    I've posted my code just because sintek will not be able to solve the problem, that's all.
    Although your assumption might be correct, I believe it was a bit harsh to make such a statement about sintek, as he has kept on trying, and maybe could come up with a workable solution comparable to your outcome of solving the issue.

    Granted, you have provided an excellent solution, but so could sintek as well, given the opportunity the further explore his efforts.

    Contributors helping each other are welcome, and is in fact encouraged, without belittling the other, unless it is done so with a sense of tongue in the cheek humor.

    To both of you, sintek included, keep up the good work!

    Regards.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 19
    Last Post: 10-16-2017, 12:34 PM
  2. [SOLVED] Copy specific column data from one sheet to another sheet using Certain filter Criteria
    By xlhelp7 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-02-2017, 12:09 AM
  3. Automatically copy rows to another sheet based on criteria, when original sheet is updated
    By NoviceProgrammer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2016, 02:14 AM
  4. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  5. Replies: 1
    Last Post: 11-14-2013, 09:24 PM
  6. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  7. Need Macro to search from mater sheet and copy in another sheet based on Criteria
    By humacdeep in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-29-2012, 01:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1