Excel - Search column for condition
Closed
Matey
-
Dec 13, 2010 at 07:06 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Dec 15, 2010 at 08:29 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Dec 15, 2010 at 08:29 PM
Related:
- Excel - Search column for condition
- Excel apk for pc - Download - Spreadsheets
- Yahoo search history - Guide
- Safe search settings - Guide
- Kernel for excel - Download - Backup and recovery
- How to search for words on a page - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Dec 15, 2010 at 08:29 PM
Dec 15, 2010 at 08:29 PM
It would be helpful to help you if all the information is given.
you have not told where the list of names like john etc are parked. You also did not say where you will be entering the names .
let us suppose it is parked in cell J3 and down with no gap. You can have as many names in the row as you like. If the list is not in this range modify the event code in the code statemnt
set r=...........................................
I have taken the names are entered in column A with no header row.
if it is in different column modify the line
if target.column <>.......................................
open vb editor (alt+F11). click control+R. in the project all open files are listed including hidden files. go to the relevant file and right click "sheet1" and click view code
in the window that comes up copy this event code
you have not told where the list of names like john etc are parked. You also did not say where you will be entering the names .
let us suppose it is parked in cell J3 and down with no gap. You can have as many names in the row as you like. If the list is not in this range modify the event code in the code statemnt
set r=...........................................
I have taken the names are entered in column A with no header row.
if it is in different column modify the line
if target.column <>.......................................
open vb editor (alt+F11). click control+R. in the project all open files are listed including hidden files. go to the relevant file and right click "sheet1" and click view code
in the window that comes up copy this event code
Private Sub Worksheet_Change(ByVal Target As Range) Dim cfind As Range, r As Range, x As String If Target.Column <> 1 Then Exit Sub x = Target.Value Set r = Range(Range("J3"), Range("J3").End(xlDown)) Set cfind = r.Cells.Find(what:=x, lookat:=xlWhole) If cfind Is Nothing Then MsgBox "this new entry is not available in the list" End Sub