LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Macro that moves data "From Akash"

I have a workbook that has over 6 worksheets in it. What I would like
to do is copy data from each of the worksheets into one master
worksheet so I can export it cleanly.

My idea is to make a 7th worksheet and reference each sheet via a
table look-up, then run a loop to copy cells until there are two more
cells that are empty(we have blank cells in between) then move on to
the next worksheet.

In addition to it i am using the below mentioned code.

Sub aki1()
Set SrcBook = ActiveWorkbook
Set nwbook = Workbooks.Add
If nwbook.Worksheets.Count < 1 Then
nwbook.Worksheets.Add
End If
SrcBook.Activate
i = 1
For Each wrksh In SrcBook.Worksheets
wrksh.Range("A1").CurrentRegion.Copy _
Destination:=nwbook.Worksheets(1).Cells(i, 1)
i = i + wrksh.Range("A1").CurrentRegion.Rows.Count + 0
'change zero above to the number of blank rows you want
'between data from each sheet
Next wrksh
End Sub

But when i tried to run this Macro only the data for Sheet1 is beign
copied. I want the to copy the data of the rest of the 5 Sheets in
Sheet7. How can we do that.

The method I am using seems to me a little crude, does anyone have any
better ideas?

Thanks in Advance.

Akash

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Enter" moves the screen, not to next cell(excel07) help! dcfolsom Excel Discussion (Misc queries) 1 April 7th 10 05:28 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Sending macro based e-mail with built-in "Heading" and "Text" Prabha Excel Programming 3 January 17th 05 02:11 PM
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc Bob Reynolds[_2_] Excel Programming 0 March 4th 04 08:52 PM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"