简体   繁体   中英

Copy and Paste a Row from Sheet1 Containing “YES” in Cell J to Sheet4 in Excel 2007

I have been looking for an answer to this issue for several days by using google and various Excel troubleshooting sites. Unfortunately, I am 100% unfamiliar with Macros in Excel and my training isn't until April (I am signed up though!). Becuase I just don't understand the programming, I am having a hard time "fixing" solutions online to meet my needs. I really need to have this specifically laid out for my situation.

I have a spreadsheet containing Sheet1 and Sheet4. Sheet1 has data in columns AL and can have unlimited rows. When the value "YES" is entered in column J, I would like the macro to copy and paste that whole row into Sheet 4 in the next empty row.

Could anyone help? This project must be completed by Monday, March 19. Thank you!

If you are 100% unfamiliar with Macro, I do not recommend you start off by fixing solutions online.

You can try record Macro in order to generate some code. One way could be:

  • Filter on column J for "YES" only.
  • Copy those rows to Sheet4.

And then you can make modification to the code. (I think they are easy enough to understand). It will help if you can post the codes you have tried.

If you want to trigger this action only when a button is pressed, you can simply create that button and assign it to your macro (Sub).

If you want this to happen automatically, you will have to try the Worksheet_Change Event mentioned by Siddharth

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM