Hi Smitha, 1:First paste this macro into any module of any workbook let say workbook1 2:Now run this, now this sub will check if any worksheet exists in workbook except output sheet (manually given name to any of the sheet of workbook 1) 3:If yes any worksheet exist it will copy that and paste the contents of sheet on output sheet.
Note: output will be pasted one by one : Hope it will be clear to you. Regards Prince: On Sunday, January 13, 2013 2:25:46 PM UTC+5:30, Smitha S R wrote: > > Hi, > > Can you explain the macro used > > On Fri, Jan 11, 2013 at 1:19 PM, Prince <prince...@gmail.com <javascript:> > > wrote: > >> hi Smitha, >> >> >> please get this >> >> Public Sub CombineData() >> >> Public Sub CombineData() >> >> Dim wks As Worksheet >> >> For Each wks In ThisWorkbook.Worksheets >> If wks.Name = "Index" Or wks.Name = "Output" Then >> GoTo lbl >> Else >> wks.UsedRange.Copy >> With ThisWorkbook.Worksheets("OutPut") >> .Range("A" & .Range("A" & >> Rows.Count).End(xlUp).Row).PasteSpecial >> End With >> Application.CutCopyMode = False >> End If >> lbl: >> Next >> End Sub >> >> note: please insert 1 sheets in ur workbook "OutPut" output sheet will >> hold all the data of all sheet in ur workbook >> >> >> >> On Friday, January 11, 2013 12:32:11 PM UTC+5:30, Smitha S R wrote: >> >>> Hi, >>> >>> Any one please help me in combining the data in two different work >>> sheets in to another worksheet. >>> Its really urgent. >>> >>> >>> >>> On Fri, Jan 11, 2013 at 12:30 PM, Smitha S R <sperd...@gmail.com> wrote: >>> >>>> It not working, run time error 1004 appears >>>> >>>> On Fri, Jan 11, 2013 at 12:23 PM, Prince <prince...@gmail.com> wrote: >>>> >>>>> https://groups.google.com/**foru**m/?hl=en&fromgroups=#!**searchin** >>>>> /excel-macros/merge/**excel-**macros/8T3EPECvA10/**Y3vwNk6wM-**YJ<https://groups.google.com/forum/?hl=en&fromgroups=#!searchin/excel-macros/merge/excel-macros/8T3EPECvA10/Y3vwNk6wM-YJ> >>>>> >>>>> >>>>> On Friday, January 11, 2013 12:20:39 PM UTC+5:30, Smitha S R wrote: >>>>> >>>>>> NO,PLEASE send it once more >>>>>> >>>>>> On Fri, Jan 11, 2013 at 12:14 PM, Prince <prince...@gmail.com> wrote: >>>>>> >>>>>>> dear >>>>>>> >>>>>>> have you seen that lik i have provided >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Friday, January 11, 2013 11:58:33 AM UTC+5:30, Smitha S R wrote: >>>>>>> >>>>>>>> HI, >>>>>>>> >>>>>>>> is this possible.. >>>>>>>> >>>>>>>> On Fri, Jan 11, 2013 at 11:28 AM, Smitha S R <sperd...@gmail.com>wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Please help >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, Jan 11, 2013 at 11:14 AM, Smitha S R >>>>>>>>> <sperd...@gmail.com>wrote: >>>>>>>>> >>>>>>>>>> HI, >>>>>>>>>> >>>>>>>>>> Is this possible without macros >>>>>>>>>> >>>>>>>>>> On Fri, Jan 11, 2013 at 11:12 AM, ashish koul <koul....@gmail.com >>>>>>>>>> > wrote: >>>>>>>>>> >>>>>>>>>>> Try this >>>>>>>>>>> >>>>>>>>>>> Sub merge1() >>>>>>>>>>> Dim i As Long, z As Long >>>>>>>>>>> ' add new sheet at last and name it merge >>>>>>>>>>> Sheets.Add After:=Sheets(Sheets.Count) >>>>>>>>>>> Sheets(Sheets.Count).Name = "Merge" >>>>>>>>>>> For i = 1 To Sheets.Count - 1 >>>>>>>>>>> ' add headers from first sheet >>>>>>>>>>> If i = 1 Then >>>>>>>>>>> ' find last filled row in the sheet >>>>>>>>>>> z = Sheets(i).Range("a1048576").**En****d(xlUp).Row >>>>>>>>>>> ' paste the data on the merge sheet >>>>>>>>>>> Sheets(i).Rows("1:" & z).Copy Destination:=Sheets("Merge").**R** >>>>>>>>>>> **ange("a1") >>>>>>>>>>> Else >>>>>>>>>>> ' find last filled row in the sheet >>>>>>>>>>> z = Sheets(i).Range("a1048576").**En****d(xlUp).Row >>>>>>>>>>> ' paste the data on the merge sheet >>>>>>>>>>> Sheets(i).Rows("2:" & z).Copy Destination:=Sheets("Merge").**R** >>>>>>>>>>> **ange("a" & Sheets("Merge").Range("**a104857****6").End(xlUp).Row >>>>>>>>>>> + 1) >>>>>>>>>>> End If >>>>>>>>>>> Next >>>>>>>>>>> End Sub >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Fri, Jan 11, 2013 at 11:05 AM, NOORAIN ANSARI < >>>>>>>>>>> noorain...@gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Smitha, >>>>>>>>>>>> >>>>>>>>>>>> can share a sample with group. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Jan 11, 2013 at 11:04 AM, Smitha S R < >>>>>>>>>>>> sperd...@gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi, >>>>>>>>>>>>> >>>>>>>>>>>>> How to merge data in two excel worksheets to another work sheet >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Join official Facebook page of this forum @ >>>>>>>>>>>>> https://www.facebook.com/**discu****ssexcel<https://www.facebook.com/discussexcel> >>>>>>>>>>>>> >>>>>>>>>>>>> FORUM RULES >>>>>>>>>>>>> >>>>>>>>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, >>>>>>>>>>>>> like Please Help, Urgent, Need Help, Formula Problem, Code >>>>>>>>>>>>> Problem, and >>>>>>>>>>>>> Need Advice will not get quick attention or may not be answered. >>>>>>>>>>>>> 2) Don't post a question in the thread of another member. >>>>>>>>>>>>> 3) Don't post questions regarding breaking or bypassing any >>>>>>>>>>>>> security measure. >>>>>>>>>>>>> 4) Acknowledge the responses you receive, good or bad. >>>>>>>>>>>>> 5) Jobs posting is not allowed. >>>>>>>>>>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>>>>>>>>>> >>>>>>>>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum >>>>>>>>>>>>> owners and members are not responsible for any loss. >>>>>>>>>>>>> --- >>>>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>>>> Google Groups "MS EXCEL AND VBA MACROS" group. >>>>>>>>>>>>> To post to this group, send email to >>>>>>>>>>>>> excel-...@googlegroups.com. >>>>>>>>>>>>> To unsubscribe from this group, send email to excel-macros...@ >>>>>>>>>>>>> **googlegroups.**c**om. >>>>>>>>>>>>> >>>>>>>>>>>>> Visit this group at http://groups.google.com/**group**** >>>>>>>>>>>>> /excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en> >>>>>>>>>>>>> . >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> With Regards, >>>>>>>>>>>> Noorain Ansari >>>>>>>>>>>> http:// >>>>>>>>>>>> <http://www.noorainansari.com>noorainansari.com<http://www.noorainansari.com> >>>>>>>>>>>> http:// <http://www.excelvbaclinic.blogspot.com> >>>>>>>>>>>> excelvbaclinic.com >>>>>>>>>>>> <http://www.excelvbaclinic.blogspot.com><http://accesssqclinic.blogspot.in/> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Join official Facebook page of this forum @ >>>>>>>>>>>> https://www.facebook.com/**discu****ssexcel<https://www.facebook.com/discussexcel> >>>>>>>>>>>> >>>>>>>>>>>> FORUM RULES >>>>>>>>>>>> >>>>>>>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, >>>>>>>>>>>> like Please Help, Urgent, Need Help, Formula Problem, Code >>>>>>>>>>>> Problem, and >>>>>>>>>>>> Need Advice will not get quick attention or may not be answered. >>>>>>>>>>>> 2) Don't post a question in the thread of another member. >>>>>>>>>>>> 3) Don't post questions regarding breaking or bypassing any >>>>>>>>>>>> security measure. >>>>>>>>>>>> 4) Acknowledge the responses you receive, good or bad. >>>>>>>>>>>> 5) Jobs posting is not allowed. >>>>>>>>>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>>>>>>>>> >>>>>>>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum >>>>>>>>>>>> owners and members are not responsible for any loss. >>>>>>>>>>>> --- >>>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>>> Google Groups "MS EXCEL AND VBA MACROS" group. >>>>>>>>>>>> To post to this group, send email to excel-...@googlegroups.com >>>>>>>>>>>> . >>>>>>>>>>>> To unsubscribe from this group, send email to excel-macros...@* >>>>>>>>>>>> *googlegroups.**c**om. >>>>>>>>>>>> >>>>>>>>>>>> Visit this group at http://groups.google.com/**group**** >>>>>>>>>>>> /excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en> >>>>>>>>>>>> . >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> *Regards* >>>>>>>>>>> * * >>>>>>>>>>> *Ashish Koul* >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *Visit* >>>>>>>>>>> *My Excel Blog <http://www.excelvbamacros.com/>* >>>>>>>>>>> Like Us on >>>>>>>>>>> Facebook<http://www.facebook.com/pages/Excel-VBA-Codes-Macros/151803898222297> >>>>>>>>>>> Join Us on Facebook<http://www.facebook.com/groups/163491717053198/> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> P Before printing, think about the environment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Join official Facebook page of this forum @ >>>>>>>>>>> https://www.facebook.com/**discu****ssexcel<https://www.facebook.com/discussexcel> >>>>>>>>>>> >>>>>>>>>>> FORUM RULES >>>>>>>>>>> >>>>>>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>>>>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and >>>>>>>>>>> Need >>>>>>>>>>> Advice will not get quick attention or may not be answered. >>>>>>>>>>> 2) Don't post a question in the thread of another member. >>>>>>>>>>> 3) Don't post questions regarding breaking or bypassing any >>>>>>>>>>> security measure. >>>>>>>>>>> 4) Acknowledge the responses you receive, good or bad. >>>>>>>>>>> 5) Jobs posting is not allowed. >>>>>>>>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>>>>>>>> >>>>>>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum >>>>>>>>>>> owners and members are not responsible for any loss. >>>>>>>>>>> --- >>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>> Google Groups "MS EXCEL AND VBA MACROS" group. >>>>>>>>>>> To post to this group, send email to excel-...@googlegroups.com. >>>>>>>>>>> To unsubscribe from this group, send email to excel-macros...@** >>>>>>>>>>> googlegroups.**c**om. >>>>>>>>>>> >>>>>>>>>>> Visit this group at http://groups.google.com/**group**** >>>>>>>>>>> /excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en> >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> -- >>>>>>> Join official Facebook page of this forum @ >>>>>>> https://www.facebook.com/**discu**ssexcel<https://www.facebook.com/discussexcel> >>>>>>> >>>>>>> FORUM RULES >>>>>>> >>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need >>>>>>> Advice will not get quick attention or may not be answered. >>>>>>> 2) Don't post a question in the thread of another member. >>>>>>> 3) Don't post questions regarding breaking or bypassing any security >>>>>>> measure. >>>>>>> 4) Acknowledge the responses you receive, good or bad. >>>>>>> 5) Jobs posting is not allowed. >>>>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>>>> >>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>>>>> and members are not responsible for any loss. >>>>>>> --- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "MS EXCEL AND VBA MACROS" group. >>>>>>> To post to this group, send email to excel-...@googlegroups.com. >>>>>>> To unsubscribe from this group, send email to excel-macros...@** >>>>>>> googlegroups.**com. >>>>>>> Visit this group at http://groups.google.com/**group** >>>>>>> /excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en> >>>>>>> . >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>> Join official Facebook page of this forum @ https://www.facebook.com/* >>>>> *discussexcel <https://www.facebook.com/discussexcel> >>>>> >>>>> FORUM RULES >>>>> >>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need >>>>> Advice will not get quick attention or may not be answered. >>>>> 2) Don't post a question in the thread of another member. >>>>> 3) Don't post questions regarding breaking or bypassing any security >>>>> measure. >>>>> 4) Acknowledge the responses you receive, good or bad. >>>>> 5) Jobs posting is not allowed. >>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>> >>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>>> and members are not responsible for any loss. >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "MS EXCEL AND VBA MACROS" group. >>>>> To post to this group, send email to excel-...@googlegroups.com. >>>>> To unsubscribe from this group, send email to excel-macros...@** >>>>> googlegroups.com. >>>>> Visit this group at http://groups.google.com/** >>>>> group/excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en> >>>>> . >>>>> >>>>> >>>>> >>>> >>>> >>> -- >> Join official Facebook page of this forum @ >> https://www.facebook.com/discussexcel >> >> FORUM RULES >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> 2) Don't post a question in the thread of another member. >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> 4) Acknowledge the responses you receive, good or bad. >> 5) Jobs posting is not allowed. >> 6) Sharing copyrighted material and their links is not allowed. >> >> NOTE : Don't ever post confidential data in a workbook. Forum owners and >> members are not responsible for any loss. >> --- >> You received this message because you are subscribed to the Google Groups >> "MS EXCEL AND VBA MACROS" group. >> To post to this group, send email to excel-...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> excel-macros...@googlegroups.com <javascript:>. >> Visit this group at http://groups.google.com/group/excel-macros?hl=en. >> >> >> > > -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en.