Move or Copy Rows & Columns Using Excel VBA, Including Move to Another Sheet and Move to End of Data

Move or Copy Rows & Columns Using Excel VBA, Including Move to Another Sheet and Move to End of Data

Chester Tugwell

6 лет назад

167,585 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Ali Alizadeh
Ali Alizadeh - 28.10.2022 06:28

Thanx

Ответить
George A. Jululian
George A. Jululian - 13.10.2022 00:35

very helpful thank you

Ответить
Matthew Anacleto
Matthew Anacleto - 11.02.2022 01:35

Does this work with tables?

Ответить
Never judge anybody
Never judge anybody - 29.10.2021 13:48

How about cutting and pasting two columns to the end of the data of 2 other columns ?

Ответить
Benji Wong
Benji Wong - 18.09.2021 23:34

can you show the macro how to move the entire row to another worksheet?
example if the column has a status "Completed" then it moves this row to Completed sheet? thanks

Ответить
Gary McNay
Gary McNay - 26.05.2021 23:13

Thanks tons...was working on this very thing for hours.

Ответить
Sam Desai
Sam Desai - 18.05.2021 16:54

What’s the code for copying certain cells in a row rather than the whole row if a condition is met?

Ответить
Matthew Stansberry
Matthew Stansberry - 20.01.2021 05:03

very helpful good presentation: clear and concise

Ответить
Idalia Ojeda
Idalia Ojeda - 14.11.2020 20:58

Love your videos!

Ответить
Abdulhamid Alhaddadi
Abdulhamid Alhaddadi - 21.06.2020 18:18

sir, how can i apply this code to all my WS

Ответить
Abdulhamid Alhaddadi
Abdulhamid Alhaddadi - 20.06.2020 22:46

thank you

Ответить
Evie Fong
Evie Fong - 12.08.2019 13:32

how about to another workbook?

Ответить
Sharee Schnoebelen
Sharee Schnoebelen - 10.06.2019 16:14

I am trying to use this with an if scenario. Whenever I have the words completed and/or N/A in columns D through L, I want the rows to automatically move to my second sheet. How do I do that?

Ответить
Peter Michael
Peter Michael - 02.05.2019 22:12

Thanks very much. This video was very helpful, especially the Offset feature at the end. Your code worked great for me except for one glitch. When I copy/insert values into the target columns that already have values (such as in your example), the macro works great. However, when the target columns are empty, I get a macro error. After I manually enter one row of values in the target columns, then the macro works great. BTW, my row 1 is a frozen header row, but I don't know if that makes a difference. Thanks.

Ответить
Sir Corn
Sir Corn - 05.02.2019 20:17

Hi, thanks for the video. Do you have a solution for the task: I would like to select a row, cut it, select another row and insert the cut one there? Thank you

Ответить
Anson Laniyan
Anson Laniyan - 23.12.2018 05:58

Fantastically simplified, what if I wanna copy from column A and D OR Column A D & H? What is the separator needed to copy multiple and paste or insert

Ответить
Wen Kian Sem
Wen Kian Sem - 26.11.2018 12:00

Hi, i got one issue that.
I want to copy a last cell of the column which change when ppl type.
To do that, i get the last row number by
Lrow= cells(rows.count, 1).end(xlup).row
Is it possible that i can do things like below?
Cells(Lrow,1).copy and then paste using the same format.
I have tried many possible way to do it but still there is error

Ответить
Wade Brewer
Wade Brewer - 14.11.2018 15:01

Exactly what I'm trying to accomplish, I'm assembling a production schedule for current job and need to sort, then move jobs from scheduling pool to line(s) schedule. I could not see how you closed he string, can you copy the text to this comment or to your description, please? Thank you so much sir!

Ответить
Manoj Kumar
Manoj Kumar - 14.10.2018 17:48

Please share sample sheet.

Ответить
Matthew W.
Matthew W. - 10.10.2018 22:46

Thanks for this video, it helped me get a better understanding of how to manipulate Excel VBA a bit more! I am trying to write a Macros for this sheet at work that is similar to what you are doing here, however, I need to shift cells or cut and paste within the same sheet. For example: I want to have an If then statement that reads something like this; =IF(A1="Sat",Shift2xDown,A1). Saying that if the cell reads Saturday, the corresponding value is moved 2 cells down in the same column with no rows over.
This is similar to the copy and paste you did at the end of the video, but would just be cut and pasted 2 rows down with the logic of the If then statement included. Is there any way that you could help with this?

Ответить
Jon Bay
Jon Bay - 19.08.2018 20:58

Just what I needed! Created a very simple Parts list where my customers can simply click on parts of an image and it will add to a list that they can then send to me. :) Cheers

Ответить
YesAlwaysSucks
YesAlwaysSucks - 31.07.2018 19:09

thank you very much, this is very useful
is it possible to help me in something please?
i have a training database, of which all countries from regions send me their training progress, like 12 rows per week.
i'm noob in vba, so i tried couple of ideas and was able to search for MENA value in rows, copy it, and past it in another sheet called MENA, same as other regions. however what i have found is each time i update the database, i click update, it recopy all the MENA value (old and new) and paste it after what has been copied before in MENA sheet.
i want to have one button to update all regions, without duplication.. is that possible?

Ответить