Selecting a range of data from another using a table in another worksheet

spiderjolly

Board Regular
Joined
Oct 20, 2009
Messages
58
HI guys
I am no expert on VBA and could really do with some help. I have data in a table on one worksheet and want to click on the result in a cell that is the performance of the bucket in the worksheet Overview and then for it to take me to the second worksheet, action tracker and alllow me to only see the cell range that I have asked for . For instance if i click on CH - Bespoke cell, where 1.2% is the intersection of the two, I want to view the range of rows that have issues in the action tracker. I hope this is clear enough for you to help, thanks in advance. Brgds Sean

Overview of performance Sheet name "Overview"
[TABLE="width: 679"]
<tbody>[TR]
[TD][/TD]
[TD]Target[/TD]
[TD]Performance[/TD]
[TD]Discipline[/TD]
[TD]Time / Resource[/TD]
[TD]Bespoke[/TD]
[TD]Equipment[/TD]
[TD]Unallocated[/TD]
[/TR]
[TR]
[TD]Country[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AT[/TD]
[TD]95.5%[/TD]
[TD]93.8%[/TD]
[TD]0.0%[/TD]
[TD]0.8%[/TD]
[TD]0.0%[/TD]
[TD]0.4%[/TD]
[TD]5.0%[/TD]
[/TR]
[TR]
[TD]BE[/TD]
[TD]86.0%[/TD]
[TD]82.0%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]18.0%[/TD]
[/TR]
[TR]
[TD]BG[/TD]
[TD]96.2%[/TD]
[TD]96.0%[/TD]
[TD]2.0%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]2.0%[/TD]
[/TR]
[TR]
[TD]CH[/TD]
[TD]97.7%[/TD]
[TD]96.4%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]1.2%[/TD]
[TD]0.5%[/TD]
[TD]1.9%[/TD]
[/TR]
[TR]
[TD]CZ[/TD]
[TD]76.8%[/TD]
[TD]59.9%[/TD]
[TD]0.0%[/TD]
[TD]0.0%[/TD]
[TD]4.0%[/TD]
[TD]10.0%[/TD]
[TD]26.1%[/TD]
[/TR]
[TR]
[TD]DE[/TD]
[TD]84.9%[/TD]
[TD]79.0%[/TD]
[TD]0.0%[/TD]
[TD]0.5%[/TD]
[TD]0.0%[/TD]
[TD]5.4%[/TD]
[TD]15.1%[/TD]
[/TR]
</tbody>[/TABLE]


Action Tracker Sheet the same.

[TABLE="width: 1143"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Meeting[/TD]
[TD]Issue Date[/TD]
[TD]Description[/TD]
[TD]Performance bucket[/TD]
[TD]Country[/TD]
[TD]Depot[/TD]
[TD]Status[/TD]
[TD]Priority[/TD]
[TD]Due Date[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]11/27/2017[/TD]
[TD][/TD]
[TD]Direct feeder EPCOS[/TD]
[TD]Bespoke processes[/TD]
[TD]AT[/TD]
[TD]GRZ[/TD]
[TD]In progress[/TD]
[TD]H[/TD]
[TD]1/15/2018[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]11/27/2017[/TD]
[TD][/TD]
[TD]very short time window between arrival and processing to connect on-time of dedicated truck ex customer Palfinger[/TD]
[TD]Time/Resource issues[/TD]
[TD]AT[/TD]
[TD]SZG[/TD]
[TD]In progress[/TD]
[TD]M[/TD]
[TD]1/15/2018[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11/27/2017[/TD]
[TD][/TD]
[TD]issue with data transmission[/TD]
[TD]Equipment issues[/TD]
[TD]AT[/TD]
[TD]VIE[/TD]
[TD]In progress[/TD]
[TD]L[/TD]
[TD]1/15/2018[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11/27/2017[/TD]
[TD][/TD]
[TD]Mettler Toledo non convey measuring arm is broken[/TD]
[TD]Equipment issues[/TD]
[TD]AT[/TD]
[TD]LNZ[/TD]
[TD]In progress[/TD]
[TD]L[/TD]
[TD]1/15/2018[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]11/27/2017[/TD]
[TD][/TD]
[TD]Several times CWC V Tronic was used on Inbound mode, due to this many export cons leave without RPP. Shipments coming with own printed labels from the sender did not pass any RPP at all before export.[/TD]
[TD]Discipline[/TD]
[TD]BG[/TD]
[TD]SOF[/TD]
[TD]In progress[/TD]
[TD]M[/TD]
[TD]1/15/2018[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11/27/2017[/TD]
[TD][/TD]
[TD]Sender Account Nr. 000212240 (TNT Swiss Post SA) needs to exclude from the report as this
account nr. will only used in case of return shipments for the LGI / Bally / Jimmy Choo customers.[/TD]
[TD]Bespoke processes[/TD]
[TD]CH[/TD]
[TD]LUG[/TD]
[TD]In progress[/TD]
[TD]M[/TD]
[TD]1/15/2018[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
With the assumption that data in both sheets for the examples shown begin in column A, you might be able to use this worksheet event code. The code would be installed in the Overview sheet.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target = "" Then Exit Sub
Dim fn As Range
    Set fn = Sheets("Action Tracker").Range("F:F").Find(sh1.Cells(Target.Row, 1).Value, , xlValues, xlWhole)
        If Not fn Is Nothing Then
            fAdr = fn.Address
            Do
                If InStr(fn.Offset(, -1).Value, Cells(1, Target.Column).Value) > 0 Then
                    Sheets("Overview").UsedRange.Rows.Hidden = True
                    Sheets("Overview").Rows(fn.Row).Hidden = False
                    Sheets("Overview").Select
                    Exit Do
                End If
                fn = Sheets("Action Tracker").Range("F:F").FindNext(fn)
            Loop While fn.Address <> fAdr
        End If
End Sub

Since I am guessing at where on the sheets your data is located, you might need to modify some of the parameters in the code.
Also, if the code works as is, you will need to unhide the rows on Action Tracker when you have finshed working the issue.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top