Double Click/Filtering on another sheet

sturnusek

Board Regular
Joined
Sep 20, 2018
Messages
51
Hi there,

I would like to double click on a value within a sheet called Capacity, for it to be filtered out on another sheet, called Status. In Status, I have a table range already done called Details, and the column to be searched from is B4,

any ideas?

Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I managed to solve my problem, code is listed below if anyone ever encountered a request like mine.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

Dim strCellVal As String
Dim i As Long


On Error Resume Next


If Target.Cells.Count <> 1 Then Exit Sub


If Not Intersect(Target, [Projects[Region]]) Is Nothing Then
strCellVal = Target.Value
With Sheet2
.ListObjects(1).Range.AutoFilter 1, Criteria1:=(Target)
.Activate
i = .ListObjects(1).Range.Columns(1).SpecialCells(xlCellTypeVisible).Count
If i = 1 Then
.ListObjects(1).Range.End(xlDown).Offset(1, 2).Value = strCellVal
End If
.[B4].Select
End With
Cancel = True
End If


If Not Intersect(Target, [Projects[OtherField]]) Is Nothing Then
strCellVal = Target.Value
With Sheet2
End With
Cancel = True
End If


End Sub
 
Upvote 0

Forum statistics

Threads
1,215,191
Messages
6,123,553
Members
449,108
Latest member
rache47

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