PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 4.00 average.

consolidate data (i.e. a single cell) from multiple spreadsheets intoa single sheet

 
 
James Sheriff
Guest
Posts: n/a
 
      4th Aug 2010
Hello. I have about 900 worksheets (worksheet1, worksheet2, etc) all
of which have a single cell (mixed in with many other cells with data)
that i am interesting in copying and pasting into a single
spreadsheet. Am wondering if this is possible to pull of.

Basically, in every single worksheet, in rows 2, 3 or 4, there is a
single cell that has "PCP:" followed by the address i need.

Ideally, i can find a way to copy the contents of all of those address
cells into a single worksheet in A2, A3, A4, etc (i.e., into a single
column).

Any suggestions (including VBA code) would be greatly appreciated.
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      4th Aug 2010
James Sheriff formulated on Wednesday :
> Hello. I have about 900 worksheets (worksheet1, worksheet2, etc) all
> of which have a single cell (mixed in with many other cells with data)
> that i am interesting in copying and pasting into a single
> spreadsheet. Am wondering if this is possible to pull of.
>
> Basically, in every single worksheet, in rows 2, 3 or 4, there is a
> single cell that has "PCP:" followed by the address i need.
>
> Ideally, i can find a way to copy the contents of all of those address
> cells into a single worksheet in A2, A3, A4, etc (i.e., into a single
> column).
>
> Any suggestions (including VBA code) would be greatly appreciated.


More info would be helpful for making suggestions.

Are all 900 worksheets in a single workbook?
Are all the cells containing the address you need always in the same
column?
Do you need to parse the address from the cell contents?
Are there likely to be several cells with needed addresses on one
sheet? IOW, do you want to extract addresses from all cells on a sheet
in rows 2 to 4 that contain "PCP:"?
....

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
James Sheriff
Guest
Posts: n/a
 
      4th Aug 2010
On Aug 4, 9:53*am, GS <gesan...@netscape.net> wrote:
> James Sheriff formulated on Wednesday :
>
> > Hello. I have about 900 worksheets (worksheet1, worksheet2, etc) all
> > of which have a single cell (mixed in with many other cells with data)
> > that i am interesting in copying and pasting into a single
> > spreadsheet. Am wondering if this is possible to pull of.

>
> > Basically, in every single worksheet, in rows 2, 3 or 4, there is a
> > single cell that has "PCP:" followed by the address i need.

>
> > Ideally, i can find a way to copy the contents of all of those address
> > cells into a single worksheet in A2, A3, A4, etc (i.e., into a single
> > column).

>
> > Any suggestions (including VBA code) would be greatly appreciated.

>
> More info would be helpful for making suggestions.
>
> * Are all 900 worksheets in a single workbook?
> * Are all the cells containing the address you need always in the same
> column?
> * Do you need to parse the address from the cell contents?
> * Are there likely to be several cells with needed addresses on one
> sheet? IOW, do you want to extract addresses from all cells on a sheet
> in rows 2 to 4 that contain "PCP:"?
> ...
>
> --
> Garry
>
> Free usenet access athttp://www.eternal-september.org
> ClassicVB Users Regroup! comp.lang.basic.visual.misc


Thanks for the response. All cells are in column A. (sorry, should
have pointed that out). No need to parse the address. Only one Address
in one sheet. So the resulting output could be:

In A2: PCP....with address (which comes from sheet1).
In A3: PCP....with address (which comes from sheet2).
In A4: PCP....with address (which comes from sheet3).
Etc.
 
Reply With Quote
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      4th Aug 2010
On Aug 4, 10:11*am, James Sheriff <educationfirst...@gmail.com> wrote:
> On Aug 4, 9:53*am, GS <gesan...@netscape.net> wrote:
>
>
>
>
>
> > James Sheriff formulated on Wednesday :

>
> > > Hello. I have about 900 worksheets (worksheet1, worksheet2, etc) all
> > > of which have a single cell (mixed in with many other cells with data)
> > > that i am interesting in copying and pasting into a single
> > > spreadsheet. Am wondering if this is possible to pull of.

>
> > > Basically, in every single worksheet, in rows 2, 3 or 4, there is a
> > > single cell that has "PCP:" followed by the address i need.

>
> > > Ideally, i can find a way to copy the contents of all of those address
> > > cells into a single worksheet in A2, A3, A4, etc (i.e., into a single
> > > column).

>
> > > Any suggestions (including VBA code) would be greatly appreciated.

>
> > More info would be helpful for making suggestions.

>
> > * Are all 900 worksheets in a single workbook?
> > * Are all the cells containing the address you need always in the same
> > column?
> > * Do you need to parse the address from the cell contents?
> > * Are there likely to be several cells with needed addresses on one
> > sheet? IOW, do you want to extract addresses from all cells on a sheet
> > in rows 2 to 4 that contain "PCP:"?
> > ...

>
> > --
> > Garry

>
> > Free usenet access athttp://www.eternal-september.org
> > ClassicVB Users Regroup! comp.lang.basic.visual.misc

>
> Thanks for the response. All cells are in column A. (sorry, should
> have pointed that out). No need to parse the address. Only one Address
> in one sheet. So the resulting output could be:
>
> In A2: PCP....with address (which comes from sheet1).
> In A3: PCP....with address (which comes from sheet2).
> In A4: PCP....with address (which comes from sheet3).
> Etc.- Hide quoted text -
>
> - Show quoted text -


Option Explicit
Sub FindemSAS()
Dim ms As String
Dim mr
Dim i As Long
ms = ActiveSheet.Name
For i = 1 To Worksheets.Count
With Sheets(i)
If .Name <> ms Then
Set mr = .Columns("A").Find(What:="pcp", LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If Not mr Is Nothing Then
' MsgBox .Name & " " & mr.Row
Cells(i, 1) = .Name
Cells(i, 2) = .Cells(mr.Row, 2)
End If
End If
End With
Next i
End Sub
 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      4th Aug 2010
on 8/4/2010, James Sheriff supposed :
> On Aug 4, 9:53*am, GS <gesan...@netscape.net> wrote:
>> James Sheriff formulated on Wednesday :
>>
>>> Hello. I have about 900 worksheets (worksheet1, worksheet2, etc) all
>>> of which have a single cell (mixed in with many other cells with data)
>>> that i am interesting in copying and pasting into a single
>>> spreadsheet. Am wondering if this is possible to pull of.
>>> Basically, in every single worksheet, in rows 2, 3 or 4, there is a
>>> single cell that has "PCP:" followed by the address i need.
>>> Ideally, i can find a way to copy the contents of all of those address
>>> cells into a single worksheet in A2, A3, A4, etc (i.e., into a single
>>> column).

>>
>>> Any suggestions (including VBA code) would be greatly appreciated.

>>
>> More info would be helpful for making suggestions.
>>
>> * Are all 900 worksheets in a single workbook?
>> * Are all the cells containing the address you need always in the same
>> column?
>> * Do you need to parse the address from the cell contents?
>> * Are there likely to be several cells with needed addresses on one
>> sheet? IOW, do you want to extract addresses from all cells on a sheet
>> in rows 2 to 4 that contain "PCP:"?
>> ...
>>
>> --
>> Garry
>>
>> Free usenet access athttp://www.eternal-september.org
>> ClassicVB Users Regroup! comp.lang.basic.visual.misc

>
> Thanks for the response. All cells are in column A. (sorry, should
> have pointed that out). No need to parse the address. Only one Address
> in one sheet. So the resulting output could be:
>
> In A2: PCP....with address (which comes from sheet1).
> In A3: PCP....with address (which comes from sheet2).
> In A4: PCP....with address (which comes from sheet3).
> Etc.


Don's solution is pretty much what I'd do. Though, I see he's putting
the sheetname in ColumnA and the address in ColumnB; ..which is not
what you asked for! In this case, just comment out the line that enters
sheetname and change the Column arg in the next line to 1 instead of 2.
(-OR- you can delete everything from the right of the first = sign to
the right of the 2nd = sign)

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
consolidate data (i.e. a single cell) from multiple spreadsheets intoa single sheet James Sheriff Microsoft Excel Discussion 1 4th Aug 2010 03:56 PM
Consolidate multiple worksheets into a single worksheet =?Utf-8?B?VFRhbQ==?= Microsoft Access Macros 1 16th Mar 2007 11:34 PM
Consolidate multiple workbooks into a single worksheet =?Utf-8?B?S3Jpc3Rh?= Microsoft Excel Worksheet Functions 1 15th May 2006 05:10 PM
Consolidate multiple spreadsheets into a single workbook =?Utf-8?B?QW5keSBU?= Microsoft Excel Misc 0 24th Apr 2006 01:13 PM
Multiple sheets as data for a single sheet =?Utf-8?B?TmV3YmllMTA5Mg==?= Microsoft Excel Worksheet Functions 1 19th Dec 2005 05:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:35 AM.