View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
dmthornton dmthornton is offline
external usenet poster
 
Posts: 19
Default Find Match in another WB and return detailed sheet

I think you answer to matching the right cell is to either use "Find" or a
"For Each".

Example using WBwip ColA

Worksheet("WBwip").Columns(1).Find(What:=Activecel l...

or

For each c in Worksheet("WBwip").Columns(1).SpecialCells(xlCellT ypeConstants)
If c = Activecell Then
c.Select
Exit For
End If
Next

"GregR" wrote:

dmthornton, I think you are close. WBwip sheet is a pivot table and if
for instance the project book has 5 projects in ColA, I want to match
the project to the same project found in WBwip colA. So now, lets say
the project was found at A2000, A2000 is the activecell and that cell
is offset to J2000, which has the total expenditures for the project in
the pivot table. With the statement showdetails, it automatically adds
a sheet to the wbwip book with all the expenditure details. That sheet
is then moved to the projects book. Then loop through the other
projects in the project book to get all detail sheets into the project
book. The routine described above omits the expansion of the details
sheet and the moving to projects book. I think I can get that part. Its
the matching of the project and getting the active cell to be the, in
the above example "J2000". HTH

Greg