View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default How to copy data from several worksheets into one

Azra,

The macro below was written assuming that you have a sheet named "Master
Sheet" that is currently blank, the BUILT always appears in column A (and
only once), and the four columns that you want to copy are A, B, C, and D,
the data is contiguous, and there are no blanks in column A when you have
data in columns B, C, and D.

HTH,
Bernie
MS Excel MVP


Sub AZRATest()
Dim mySht As Worksheet
For Each mySht In ActiveWorkbook.Worksheets
If mySht.Name < "Master Sheet" Then
mySht.Range(mySht.Range("A:A").Find("BUILT")(2), _
mySht.Range("A65536").End(xlUp)).Resize(, 4).Copy _
Worksheets("Master Sheet").Range("A65536").End(xlUp)(2)
End If
Next mySht
End Sub


"Azra Akhter"
wrote in message
...

Hi,

I have a spreadsheet with 72 worksheets. I have to copy the data
from each one of them into a master sheet. My problem is I can not copy
everything. I have to look for particular data and then copy it.

My data looks something like this:

Sheet1 :

Business Services
Date
abcd

BUILT BILLED PHONE EXT

07/09/05 07/10/05 345-6789 22


Sheet2:

Summary
Date

BUILT BILLED PHONE EXT

07/09/05 07/10/05 345-6789 22


I have to extract only the data from BUILT column to the EXT column but
on each sheet the data does not start(BULIT BILLED PHONE EXT)
consistently from one certain row.


Please help!

Azra


--
Azra Akhter
------------------------------------------------------------------------
Azra Akhter's Profile:
http://www.excelforum.com/member.php...o&userid=27483
View this thread: http://www.excelforum.com/showthread...hreadid=471160