Excel VBA to Copy/Move Data Within Sheet, to Another Sheet or Another Workbook

Excel VBA to Copy/Move Data Within Sheet, to Another Sheet or Another Workbook

Chester Tugwell

6 лет назад

155,555 Просмотров

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


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

@smhameed1918
@smhameed1918 - 30.08.2024 00:52

Do we have anything like we can move whole sheet to other workbook

Ответить
@Abidaytrader
@Abidaytrader - 14.09.2023 23:30

Create a Macro to Copy Auto Filtered Dataset to a New Excel Workbook, please provide the VBA code with macro

Ответить
@joannaklosowska2017
@joannaklosowska2017 - 29.04.2023 10:29

Hi Chester. Thank you very much for your videos! I don't know anything about macros and at the same time, I'm writing them. Thanks to you :)

Ответить
@allahwithme1731
@allahwithme1731 - 01.11.2022 21:17

Thank you dear.
One inquiry please, how can I use cut cells but only value not formula

Ответить
@GeorgeAJululian
@GeorgeAJululian - 13.10.2022 00:52

Thank you very useful

Ответить
@zeshankhan2455
@zeshankhan2455 - 10.10.2022 08:48

how to repeated rows X number of time in excel vba

Ответить
@fksons4161
@fksons4161 - 07.09.2022 04:55

Thank you so much

Ответить
@wesdesa
@wesdesa - 07.09.2022 00:34

hello, I have a code like below, the code is working in the same page. My aim is to write the data in page 1 on the lines a2: a500 on page 2. I would appreciate your help.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Column > 1 Then Exit Sub
If Target.Row > 35 Then Exit Sub
For Each a In Range("a2:a" & Range("a65536").End(3).Row)
If a.Value Like Target.Value & "*" Then
Target.Value = a.Value
Exit Sub
End If
Next
End Sub

Ответить
@alializadeh8195
@alializadeh8195 - 04.06.2022 05:10

Thanx

Ответить
@lisama2538
@lisama2538 - 09.03.2022 00:17

omg love the flow and the excellent tutorial, thanks!

Ответить
@rinupvr3960
@rinupvr3960 - 17.09.2021 20:02

Can you send this work book ore macro code to me

Ответить
@michellegygax6527
@michellegygax6527 - 15.06.2021 20:29

I am loving this videos, I am having some trouble trying to create an invoice that can be reused, but the data entered remain saved into a log sheet. Can you suggest some tutorials for me to watch to be able to do that. I have NEVER worked with VBA's and have been confused by them until coming across your tutorials--you explain and walk through the steps very well and are easy to follow.

UPDATE: I got it...now I am just having trouble with brining the sum over from the other sheet/log--any help will be appreciated.

Ответить
@chewhouming3386
@chewhouming3386 - 11.06.2021 18:21

How to paste row F4:F5 till last row in column A.

LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Range("F4:H4").Copy Range("F5:H5" & LastRow)

Ответить
@imyong7983
@imyong7983 - 04.05.2021 04:41

Thank you such simple and easy to follow instruction

Ответить
@GhostRider-mz1hl
@GhostRider-mz1hl - 17.12.2020 12:22

Morning Chester, I have watched your video, but! the problem for me is this, you don't give the option to paste the text only in the cell or cell range, for example my destination sheet (Main data base) has got set up formatted cells coloured cells, and boarders and formulas in them for example yellow cells, and sheet 2 is my update sheet, which has the same information but! no formatting or formulas in it, and any new data I add in sheet 2 will always go at the top, and the rest of the information will move down as new data gets added, then I will click on my UPDATE MAIN DATABASE button to update my MAIN DATABASE, so in your VBA CODE, please can you tell me what the vba code including the cell range as shown in your video to just paste the text only so that none of the formatting colored cells/boarders and any formulas in my main database does not get pasted over except for the text, PS I am using office 365, thank you, I look forward to hearing from you. With kind regards Steve.

Ответить
@alekm9446
@alekm9446 - 02.12.2020 01:41

Well explained, thank you!

Ответить
@عابثالأخير-ز9ي
@عابثالأخير-ز9ي - 09.09.2020 18:37

It is very simple and helpful, very thanks 🌹

Ответить
@syedikramulla3693
@syedikramulla3693 - 03.07.2020 16:15

I have a sheet with macro. When copy the sheet, macro is also getting copied in the new sheet. Please let me know how to avoid macro getting copied or disable macro in the new sheets.

Ответить
@renukavashisth6744
@renukavashisth6744 - 08.06.2020 22:33

Sir I have a question I want to copy one date to next date then copy next date until another date in loop
Like in A1 I have 01/05/2020 & in A10 I have 02/05/2020 & A12 I have 03/05/2020. Now I want to fill dates in cell A2 to A9 date 01/05/2020 so on dates are not in same position
Plz help me

Ответить
@FaysalEasyExcel
@FaysalEasyExcel - 13.04.2020 05:14

thanks it's very helpful and will save my time

Ответить
@PankajKumar-rx6od
@PankajKumar-rx6od - 20.02.2020 01:21

Thanks

Ответить
@eddiemayah5504
@eddiemayah5504 - 01.01.2020 12:13

this is very useful

Ответить
@wxmyjnsn
@wxmyjnsn - 27.12.2019 01:19

This was VERY useful, thank you! However, I need to cut and paste the active row from one table to another table on a different sheet and then delete the empty row. How do I do that?

Ответить
@barrycomben5386
@barrycomben5386 - 26.11.2019 11:03

Chester, Best vba module creation explanation on the web. I wonder if you could help me write one (from a Button) which transfers all my listed assets that need P.A.T testing to another P.A.T testing sheet. If they need testing cell 7 will indicate 'yes'.?

Ответить
@nilsbruhner1983
@nilsbruhner1983 - 14.05.2019 20:51

Very Nice and useful video. Thank U for education.//Nils

Ответить
@lazmusic1
@lazmusic1 - 23.04.2019 18:23

Hi Chester, thank you for an excellent explanation of this topic. I have a question which may need a somewhat long answer and may test your generosity with providing free instructions but I'll ask it anyway! I need a code for copying certain cells from one sheet to a row in another sheet in the same workbook by clicking a button and for each instance of clicking that button (after the completion of the required information) for the new set of data to appear on the subsequent row in the destination sheet, as if one was inputting data in an Access form. Apologies for the long question again and many thanks.

Ответить
@ShikhaSharma-qw4px
@ShikhaSharma-qw4px - 07.03.2019 18:47

Thank you. I want to copy different ranges (ex- b2:b10 and s2:s10) from one workbook and paste it to another workbook (ex- b2:b10 copied range should paste in aa2 of this workbook and s2:s10 copied range should paste in bb2). Sheet name is dynamic it will change every week. It would be great if you could help me out.

Ответить
@nicholetam5104
@nicholetam5104 - 12.02.2019 16:49

can you do a video on copy dynamic range from A2 onwards and paste it in a different workbook? thanks

Ответить
@mohammedhussein1592
@mohammedhussein1592 - 15.12.2018 17:34

Hi Chester, thanks for the video
One question, can I copy the Data to a new workbook ??
Like once I run the Macro it should open a new workbook and paste the data inside it

Thanks a lot

Ответить
@manasimahajan8307
@manasimahajan8307 - 04.11.2018 00:43

This Works for me now -
Sub CopyToBook()

Set y = Workbooks.Open("Path to the file")

Workbooks("Book2.xlsm").Worksheets("Sheet1").Range("C22").Copy
y.Sheets("Sheet1").Range("B5").PasteSpecial
End Sub

Ответить
@manasimahajan8307
@manasimahajan8307 - 04.11.2018 00:11

Thank you for the video :)
copytobook for some reason does not work
Sub CopyToBook()
Range("A20").Copy Workbooks("newB").Worksheets("Sheet1").Range("A5")
End Sub
It gives me Run-time error '9'
Subscription out of Subscript

Could you please suggest if anything needs to be changed in the code

Ответить
@augustooviedo8207
@augustooviedo8207 - 19.09.2018 20:51

Thanks so much, really

Ответить
@MrPakiwarrior
@MrPakiwarrior - 05.09.2018 01:55

Hi Chester. I need some help regarding moving data from one sheet to another.
I have 6 items in a dropdown menu list.
Rice, Beans, Wheat, Corn, Grey, Pasta
I also have added a column showing cost on the right side of this dropdown column.
I have made 6 Sheets in same workbook. I need the right item to be moved to the item sheet.
Can u plz help me?

Ответить
@अहम्ब्रह्मास्मि-ख2ब
@अहम्ब्रह्मास्मि-ख2ब - 13.08.2018 12:05

I am trying to use this code but it give run time error 9.
Code:-
Sub Monthly_GST_Sales_Report()

Range("A1:W507").Copy Workbooks("Monthly_GST_Sales_Report").Worksheets("Sheet1").Range("A1")

End Sub

Ответить
@sudarshansathyanarayanan3480
@sudarshansathyanarayanan3480 - 24.07.2018 22:35

u r teaching awesome so that everybody can understand it easy.

Ответить