Thank you for your video! Exporting data from my form to excel (.csv) I'm getting all my data to one cell. In your video they are in different coloums. What can I do to have them separatly as yours? Thank you in advance!
Hello gals and guys ! How can I do the opposite ? I have the pdf certificate file, I have the excel file with 100 names. How can I join them and produce 100 pdf certificates with different name ?
I'm not getting any error when I do this and I see Excel working, but no information is being pasted into my open workbook. Here is how I modified the code for what I need (copy A2:AP101 and paste to open sheet in open workbook (starting at A2 and pasting each subsequent workbook data below the last)). Any ideas? Dim MyFile As String, Str As String, MyDir As String, Wb As Workbook Dim Rws As Long, Rng As Range Set Wb = ThisWorkbook 'change the address to suite MyDir = "C:\Users\Elisabeth\OneDrive\PhD\Research\Phising Interrupted\Experiment 3 (Online)\Data\Results Files C1\Final Results Files Test\" 'must keep backslash MyFile = Dir(MyDir & "*.csv") 'change file extension ChDir MyDir Application.ScreenUpdating = 0 Application.DisplayAlerts = 0 Do While MyFile <> "" Workbooks.Open (MyFile) With Worksheets(1) 'using index number because each workbook has a different sheet name Rws = .Cells(Rows.Count, "A").End(xlUp).Row Set Rng = Range(.Cells(2, 1), .Cells(Rws, 42)) 'column A, row 2 to column AP, last row with data Rng.Copy Wb.Worksheets(1).Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) ActiveWorkbook.Close True End With MyFile = Dir() Loop End Sub
No, column A always has data. I have a loop through folder macro that organizes all of the data so it’s readable so all of the files actually look the same.
Big thanks for the amazing video. But one problem that it will only copy 9th row(static selection) in this case. I want to select any row and on button click it should copy the data to another excel. How to do that?
can pls correct for me Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Range("A1") <> "" Then Range("A1").Select Selection.Autofill _ Destination:=Range("A1:A5"), Type:=xlFillDefault 'Range("A1").Value = "=IF(AND(F5="",G5="",H5="")),"",(I4+F5-G5-H5)))" End If 'End With End Sub
This is pretty cool. I need something similar. I have lots of files that have three specific sheets (names are same across files) that need copied into a master sheet. I have to open the workbooks, unprotect with a password, remove filters then copy paste the data as values to a master sheet. How would I add this to what you have already?
After the sheet is made visible, you can add another line. Private Sub CommandButton1_Click() If TextBox1 = "Password" Then Sheets("Worksheet1").Visible = True Sheets("Worksheet1").Select Else MsgBox "Wrong Password" End If Unload Me End Sub The link to the workbook should work now
It counts all the rows in the column. So it would be A1048576 then go up to the last filled cell in that column. This is a preferred technique because of the different row counts in different excel versions. Using xldown can be inaccurate if there is a blank cell before the last filled cell in a column.
Hi Dave, finally a solution that works for me. Thank you very much!! Its almost perfect... Can you confirm that this is only possible using a Label instead of a Textbox? It would be great if it also works with Textboxes (but I didn't manage to solve problems when trying).
Awesome! I have 1000s of invoices with same format and I need to extract data (Date, Job #, Customer Name, etc.) from particular cells and past them into a new database. This would work perfectly, but the source workbooks are set up as invoices, not a database...
Thank you for the video however I am getting an error of "unable to paste due to cell size and shape not same ". Kindly if you could provide any insight.
Hi, Thanks but this does not seems to work now....i always get the error run-time error '9': Subscript out of range....can you advise where i need to modify so this error wont appear?