Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not sure I fully understand but perhaps this example would get you
the I use it to search for key words in the cells in my previously set selection. It is two loops, a "For... Each" to move thru the rows and then a "For... Next" to work inside the cells themselves. For Each Cell In Selection 'Loop to pick character in cell For X = 1 To Len(Cell.Value) 'Loop to pick value to look FOR 'for y = 1 to If Mid(Cell.Value, X, 1) = "Eri" Then Cells(Cell.Row, 1).Value = Cells(Cell.Row, 1).Value & " eri" End If If Mid(Cell.Value, X, 1) = "test" Then Cells(Cell.Row, 1).Value = Cells(Cell.Row, 1).Value & " test" End If If Mid(Cell.Value, X, 1) = "admin" Then Cells(Cell.Row, 1).Value = Cells(Cell.Row, 1).Value & " admin" End If 'next y Next X Next Cell Hope that helps! NJ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Setup of an IF AND statement | Excel Worksheet Functions | |||
Club Dues collection report and statement setup | Excel Discussion (Misc queries) | |||
how do i setup an if, then statement | Excel Programming |