Find copy and create new excel files w macro
Closed
hero85
Posts
7
Registration date
Thursday March 12, 2009
Status
Member
Last seen
May 14, 2009
-
Mar 13, 2009 at 09:33 AM
reddishpink Posts 2 Registration date Saturday November 7, 2009 Status Member Last seen November 8, 2009 - Nov 8, 2009 at 05:28 PM
reddishpink Posts 2 Registration date Saturday November 7, 2009 Status Member Last seen November 8, 2009 - Nov 8, 2009 at 05:28 PM
Related:
- Find copy and create new excel files w macro
- Create skype account with gmail - Guide
- Create new instagram account without phone number - Guide
- Spell number in excel without macro - Guide
- Create snapchat account - Guide
- Excel macro to create new sheet based on value in cells - Guide
2 responses
hero85
Posts
7
Registration date
Thursday March 12, 2009
Status
Member
Last seen
May 14, 2009
8
Mar 17, 2009 at 05:22 PM
Mar 17, 2009 at 05:22 PM
Ok, I will try this code soon. I hope it works. Also is there not a way to copy from one file to another? I don't want to transfer to a sheet but to a file!
This code assumes that the data is in column A and there are no empty rows from the start to the end of the data. Also, the data is copied from Sheet2 to Sheet1 and the rows to copy start in row one and will be copied to row one.
Sub CopyToNewSheet()
Set o = Sheets("Sheet1") 'Where the data is copied to. You can rename it to your sheet name.
Set t = Sheets("Sheet2") 'Where the data resides. You can rename it to your sheet name.
Dim CpyData
Dim d
CpyData = 0
d = 1
Do While Not IsEmpty(t.Range("A" & d))
If IsNumeric(t.Range("A" & d)) Then
CpyData = CpyData + 1
o.Range("A" & CpyData) = t.Range("A" & d)
End If
d = d + 1
Loop
End Sub
Sub CopyToNewSheet()
Set o = Sheets("Sheet1") 'Where the data is copied to. You can rename it to your sheet name.
Set t = Sheets("Sheet2") 'Where the data resides. You can rename it to your sheet name.
Dim CpyData
Dim d
CpyData = 0
d = 1
Do While Not IsEmpty(t.Range("A" & d))
If IsNumeric(t.Range("A" & d)) Then
CpyData = CpyData + 1
o.Range("A" & CpyData) = t.Range("A" & d)
End If
d = d + 1
Loop
End Sub
reddishpink
Posts
2
Registration date
Saturday November 7, 2009
Status
Member
Last seen
November 8, 2009
Nov 8, 2009 at 05:28 PM
Nov 8, 2009 at 05:28 PM
hello ive a similar problem here.. im a newbie to VBA Script so i kinda dont have much clue of what should i do and stuff.
my case is a bit similar.. what happens when say i have 365 files (one file per day, through out the whole yr).. each file when opened in excel has 23 columns.. the only columns that i want to use is column A(minute) and column X(Solar Radiation)..
How do i import these 2 columns from each files , and have them in just one sheet, so that i only have :
in column A - minute
column B to colum ZZ - day 1 to day 365
and using macros.
Thanks!!
my case is a bit similar.. what happens when say i have 365 files (one file per day, through out the whole yr).. each file when opened in excel has 23 columns.. the only columns that i want to use is column A(minute) and column X(Solar Radiation)..
How do i import these 2 columns from each files , and have them in just one sheet, so that i only have :
in column A - minute
column B to colum ZZ - day 1 to day 365
and using macros.
Thanks!!