#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dan dan is offline
external usenet poster
 
Posts: 866
Default Analysis of data

Hello

I have 52 sheets in the same workbook.
Sheet 51 is a summary sheet, sheets 1 - 50 are detail sheets.
I would like sheet 52 to be an analysis sheet.
In the top corner of sheet 52 I would like to be able to put a code
reference on and below it, it then lists all of the sheets that contain that
code and what value the codes has next to it.

What is the easiest way of doing this?

Thanks

--
Cheers
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Analysis of data

Dan
the following macro will read a code in A1 of a sheet named Analysis.
It will then clear the area below and produce a 2-col output, sheet
name and value next to the code. It assumes that your detail sheets are
before summary and analysis. It also assumes that a code appears max
once per sheet.

Sub Analysis()
Dim codecell As Range
nextrow = 2
cod = Sheets("Analysis").Range("A1").Value
Sheets("Analysis").Range("A2:B1000").ClearContents
For i = 1 To 50
Set codecell = Sheets(i).Cells.Find(cod)
If Not codecell Is Nothing Then
Sheets("Analysis").Cells(nextrow, 1) = Sheets(i).Name
Sheets("Analysis").Cells(nextrow, 2) = codecell.Offset(0, 1)
nextrow = nextrow + 1
End If
Next i
End Sub

You can further automate the process by using an event procedure for
your Analysis worksheet:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then Call Analysis
End Sub

With this, each time a code is changed in Analysis!A1, the macro will
run automatically.

Does this help?
Kostis Vezerides

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
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
Where is data analysis tool? tamorn Excel Worksheet Functions 4 September 22nd 05 11:03 AM
data analysis option not visible Alok Excel Worksheet Functions 2 September 22nd 05 07:50 AM
statistics - data analysis tool Neil Evans-Mudie Excel Worksheet Functions 3 March 11th 05 01:05 PM
Analysis ToolPak installed but no Data Analysis option Eric Stephens Excel Discussion (Misc queries) 3 February 2nd 05 09:17 PM


All times are GMT +1. The time now is 08:11 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"