Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
White49
 
Posts: n/a
Default How do you copy items from many worksheets to one?

I have over 100 worksheets in an excel file I am working with. It is a
database of people profiles for alumni of my fraternity. Each worksheet has
the exact same formatting with the same type of information in corresponding
cells (i.e. B2 contains the person's name in each sheet). I'm trying to set
up a master sheet I can use as a database for mail merges in word. Is there
anyway I can copy the information to one sheet without going into each sheet
individually and copying and pasting?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default How do you copy items from many worksheets to one?

Hi White49

You can create links or Copy
I have a example for both on my site

http://www.rondebruin.nl/copy2.htm
And with formulas
http://www.rondebruin.nl/summary.htm

--
Regards Ron De Bruin
http://www.rondebruin.nl



"White49" wrote in message ...
I have over 100 worksheets in an excel file I am working with. It is a
database of people profiles for alumni of my fraternity. Each worksheet has
the exact same formatting with the same type of information in corresponding
cells (i.e. B2 contains the person's name in each sheet). I'm trying to set
up a master sheet I can use as a database for mail merges in word. Is there
anyway I can copy the information to one sheet without going into each sheet
individually and copying and pasting?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do you copy items from many worksheets to one?

I think I'd use a macro to build formulas to extract the values.

Like this formula:
=if(sheet2!B2="","",sheet2!b2)

If that seems like something you want to try:

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim NewWks As Worksheet
Dim myAddresses As Variant
Dim iCtr As Long
Dim DestCell As Range
Dim HowManyCells As Long
Dim iCol As Long

'which cells?
myAddresses = Array("B2", "c9", "d12", "B3")
HowManyCells = UBound(myAddresses) - LBound(myAddresses) + 1

Set NewWks = Worksheets.Add
With NewWks
.Range("a1").Value = "Worksheet Name"
.Range("B1").Resize(1, HowManyCells).Value = myAddresses
Set DestCell = .Range("a2")
End With

For Each wks In ActiveWorkbook.Worksheets
If wks.Name = NewWks.Name Then
'do nothing
Else
With DestCell
.Value = "'" & wks.Name
iCol = 0
For iCtr = LBound(myAddresses) To UBound(myAddresses)
iCol = iCol + 1
.Offset(0, iCol).Formula = "=if('" & wks.Name & "'!" _
& myAddresses(iCtr) & "="""",""""," _
& "'" & wks.Name & "'!" & myAddresses(iCtr) & ")"
Next iCtr
End With
Set DestCell = DestCell.Offset(1, 0)
End If
Next wks

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


White49 wrote:

I have over 100 worksheets in an excel file I am working with. It is a
database of people profiles for alumni of my fraternity. Each worksheet has
the exact same formatting with the same type of information in corresponding
cells (i.e. B2 contains the person's name in each sheet). I'm trying to set
up a master sheet I can use as a database for mail merges in word. Is there
anyway I can copy the information to one sheet without going into each sheet
individually and copying and pasting?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
White49
 
Posts: n/a
Default How do you copy items from many worksheets to one?

I'd be all for trying a macro. Will this work if I named my worksheets
according to the person's name?

"Dave Peterson" wrote:

I think I'd use a macro to build formulas to extract the values.

Like this formula:
=if(sheet2!B2="","",sheet2!b2)

If that seems like something you want to try:

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim NewWks As Worksheet
Dim myAddresses As Variant
Dim iCtr As Long
Dim DestCell As Range
Dim HowManyCells As Long
Dim iCol As Long

'which cells?
myAddresses = Array("B2", "c9", "d12", "B3")
HowManyCells = UBound(myAddresses) - LBound(myAddresses) + 1

Set NewWks = Worksheets.Add
With NewWks
.Range("a1").Value = "Worksheet Name"
.Range("B1").Resize(1, HowManyCells).Value = myAddresses
Set DestCell = .Range("a2")
End With

For Each wks In ActiveWorkbook.Worksheets
If wks.Name = NewWks.Name Then
'do nothing
Else
With DestCell
.Value = "'" & wks.Name
iCol = 0
For iCtr = LBound(myAddresses) To UBound(myAddresses)
iCol = iCol + 1
.Offset(0, iCol).Formula = "=if('" & wks.Name & "'!" _
& myAddresses(iCtr) & "="""",""""," _
& "'" & wks.Name & "'!" & myAddresses(iCtr) & ")"
Next iCtr
End With
Set DestCell = DestCell.Offset(1, 0)
End If
Next wks

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


White49 wrote:

I have over 100 worksheets in an excel file I am working with. It is a
database of people profiles for alumni of my fraternity. Each worksheet has
the exact same formatting with the same type of information in corresponding
cells (i.e. B2 contains the person's name in each sheet). I'm trying to set
up a master sheet I can use as a database for mail merges in word. Is there
anyway I can copy the information to one sheet without going into each sheet
individually and copying and pasting?


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do you copy items from many worksheets to one?

You're soon gonna find out, huh?

White49 wrote:

I'd be all for trying a macro. Will this work if I named my worksheets
according to the person's name?

"Dave Peterson" wrote:

I think I'd use a macro to build formulas to extract the values.

Like this formula:
=if(sheet2!B2="","",sheet2!b2)

If that seems like something you want to try:

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim NewWks As Worksheet
Dim myAddresses As Variant
Dim iCtr As Long
Dim DestCell As Range
Dim HowManyCells As Long
Dim iCol As Long

'which cells?
myAddresses = Array("B2", "c9", "d12", "B3")
HowManyCells = UBound(myAddresses) - LBound(myAddresses) + 1

Set NewWks = Worksheets.Add
With NewWks
.Range("a1").Value = "Worksheet Name"
.Range("B1").Resize(1, HowManyCells).Value = myAddresses
Set DestCell = .Range("a2")
End With

For Each wks In ActiveWorkbook.Worksheets
If wks.Name = NewWks.Name Then
'do nothing
Else
With DestCell
.Value = "'" & wks.Name
iCol = 0
For iCtr = LBound(myAddresses) To UBound(myAddresses)
iCol = iCol + 1
.Offset(0, iCol).Formula = "=if('" & wks.Name & "'!" _
& myAddresses(iCtr) & "="""",""""," _
& "'" & wks.Name & "'!" & myAddresses(iCtr) & ")"
Next iCtr
End With
Set DestCell = DestCell.Offset(1, 0)
End If
Next wks

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


White49 wrote:

I have over 100 worksheets in an excel file I am working with. It is a
database of people profiles for alumni of my fraternity. Each worksheet has
the exact same formatting with the same type of information in corresponding
cells (i.e. B2 contains the person's name in each sheet). I'm trying to set
up a master sheet I can use as a database for mail merges in word. Is there
anyway I can copy the information to one sheet without going into each sheet
individually and copying and pasting?


--

Dave Peterson


--

Dave Peterson


Reply
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
Copy Worksheets from one Workbook to Another halem2 Excel Worksheet Functions 3 March 25th 06 06:04 AM
Copy worksheet & maintain cell reference across worksheets dingy101 Excel Worksheet Functions 3 January 2nd 06 10:51 AM
How do I copy a worksheet's print parameters to other worksheets? Redundant908 Excel Worksheet Functions 2 December 6th 05 11:17 PM
Run a macro to copy selective items chrisdtran Excel Discussion (Misc queries) 2 August 12th 05 04:42 PM
how do i link a list of items in a workbook to worksheets in the . Camalla Excel Discussion (Misc queries) 2 April 22nd 05 09:35 PM


All times are GMT +1. The time now is 06:48 AM.

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"