• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

click but to sort out another column of cell. Thanks

kalua1231

Member
(This code works like this) For example: i have clicked on BUSSINESS it will only show me BUSSINESS if i click on CLASS it will only show me CLASS.

Is there's a way that when i click on BUSSINESS to have it function to sort it out in a different Column and to add others (title) beside BUSSINESS to it. thank you. What code should i change add or delete.

Attachment is here
 

Attachments

To be more clear this macro works like this if i click on a cell it would look for that word in that specific cell. I want it in a way that if i click on it, search for the word clicked in a different cell.

For example i click Business in Cell (C) have that word Business search but in another cell (E)
 
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

dim dccolumn as integer
dim dcvalue as string

dccolumn = activecell.column
dcvalue = activecell.value

If application.intersect(activecell, [headers]) is nothing then
if active cell.value<>""then

If Application.Intersect(ActiveCell, [headers]) Is Nothing Then


If ActiveCell.Value <> "" Then

Me.ListObjects(1).Range.AutoFilter Field:=dccolumn, Criteria1:=dcvalue

End If

End If

End Sub
 
please someone help i believe that the part that is highlighted is the part where i should just add the cell where it should be searching for. thank you
 
Hi ,

I don't understand anything of what you want to do , but it seems to me that changing the following line of code will help :

Me.ListObjects(1).Range.AutoFilter Field:=dccolumn + 2 , Criteria1:=dcvalue

Narayan
 
example this macro when i click on the word Business on column (C) it will look for that word and sort it out to only display that word Business.

I want to click on the word Business on column (C), but instead of sorting that column for the word Business i want it to Search Business in column (E) hope this way is clear.

Thanks for your help Narayank you help me fix my first issue yesterday
 
yes but when i click on it goes blank

simplifying it

when i Click on (C) column Word Business = it sort word Business (C) Column

What i want

When i click on (C) Column Word Business = To sort word Business in the (E) Column

hope this way of explaining helps
 
i left out a vital information out that is why in my end it did not work how i wanted it to.

is it a way that when i click on a word the other column table selects all the title but looks for the word clicked
 
Back
Top