Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to use excel to run a database(cos i really dont like office) but
i am relatively new to coding. At the moment I am running a search by filtering the colums to match user inputted data, I have come accross a problem as I need to search for one value that can occur in up to 19 columns, but i have to keep every row of data that it appears in just once. Any help would be grreatly appreciated Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In this example, the data is in cols B thru T and in rows 2 thru 100. Put
the match value in A1 and run: Sub OnlyOneTime() v = Range("A1").Value For i = 2 To 100 Set r = Range("B" & i & ":T" & i) If Application.WorksheetFunction.CountIf(r, v) 0 Then Rows(i).Hidden = False Else Rows(i).Hidden = True End If Next End Sub -- Gary''s Student - gsnu200825 "Miree" wrote: I am trying to use excel to run a database(cos i really dont like office) but i am relatively new to coding. At the moment I am running a search by filtering the colums to match user inputted data, I have come accross a problem as I need to search for one value that can occur in up to 19 columns, but i have to keep every row of data that it appears in just once. Any help would be grreatly appreciated Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter Multiple Columns on Multiple Criteria and count the last co | Excel Worksheet Functions | |||
Filter on multiple columns | Excel Discussion (Misc queries) | |||
How do I filter multiple columns at once? | Excel Discussion (Misc queries) | |||
how do i filter multiple columns | Excel Worksheet Functions | |||
how do I filter for 1 variable in multiple columns | Excel Worksheet Functions |