Find word in a column from list of words and report word found
Closed
Jmrb2356
Posts
3
Registration date
Wednesday November 22, 2017
Status
Member
Last seen
November 23, 2017
-
Nov 22, 2017 at 07:36 PM
Jmrb2356 Posts 3 Registration date Wednesday November 22, 2017 Status Member Last seen November 23, 2017 - Nov 23, 2017 at 07:27 AM
Jmrb2356 Posts 3 Registration date Wednesday November 22, 2017 Status Member Last seen November 23, 2017 - Nov 23, 2017 at 07:27 AM
Related:
- Find word in a column from list of words and report word found
- Word apk for pc - Download - Word processors
- Number to text in word - Guide
- Tick symbol in word - Guide
- Number to word in excel - Guide
- Backspace not working in word - Guide
2 responses
I have some qualifying questions, please if I may?
Does the cell contain:
"25 red begonia begonia"
Or, does it contain:
A1=25
A2=red
A3=begonia
A4=begonia
This data set that you are referring to, would be much easier with a database, and a report! Just saying!
Does the cell contain:
"25 red begonia begonia"
Or, does it contain:
A1=25
A2=red
A3=begonia
A4=begonia
This data set that you are referring to, would be much easier with a database, and a report! Just saying!
Jmrb2356
Posts
3
Registration date
Wednesday November 22, 2017
Status
Member
Last seen
November 23, 2017
Updated on Nov 23, 2017 at 07:30 AM
Updated on Nov 23, 2017 at 07:30 AM
No I know how to delimit. What I would like to do is search the purchases column using the keywords from the "List of Flowers". I have this code already but I didn't know if this was the right way to go about it since it was searching a column that only had this word in it. Also it places the answers in the E column where I would need it to be placed in the H column. I wanted to get other opinions on a better/easier way if possible.
Sub findflowers()
Dim ws As Worksheet
Set ws = ActiveWorkbook.Sheets("Sheet1")
For i = 1 To ws.Range("D65536").End(xlUp).Row
j = InStr(ws.Cells(i, 6).Value, "african lily")
If j <> 0 Then ws.Cells(i, 7).Value = "african lily"
j = InStr(ws.Cells(i, 6).Value, "alpine thistle")
If j <> 0 Then ws.Cells(i, 7).Value = "alpine thistle"
j = InStr(ws.Cells(i, 6).Value, "amazon lily")
If j <> 0 Then ws.Cells(i, 7).Value = "amazon lily"
j = InStr(ws.Cells(i, 6).Value, "baby's breath")
If j <> 0 Then ws.Cells(i, 7).Value = "baby's breath"
Next
End Sub
But this would be a lot of lines because I have a list of about 150 terms I'd like to search. And this code was if the only word in the cell were the names of the flowers and they aren't since there are amounts and colors in the same column.
Sub findflowers()
Dim ws As Worksheet
Set ws = ActiveWorkbook.Sheets("Sheet1")
For i = 1 To ws.Range("D65536").End(xlUp).Row
j = InStr(ws.Cells(i, 6).Value, "african lily")
If j <> 0 Then ws.Cells(i, 7).Value = "african lily"
j = InStr(ws.Cells(i, 6).Value, "alpine thistle")
If j <> 0 Then ws.Cells(i, 7).Value = "alpine thistle"
j = InStr(ws.Cells(i, 6).Value, "amazon lily")
If j <> 0 Then ws.Cells(i, 7).Value = "amazon lily"
j = InStr(ws.Cells(i, 6).Value, "baby's breath")
If j <> 0 Then ws.Cells(i, 7).Value = "baby's breath"
Next
End Sub
But this would be a lot of lines because I have a list of about 150 terms I'd like to search. And this code was if the only word in the cell were the names of the flowers and they aren't since there are amounts and colors in the same column.
Nov 22, 2017 at 09:14 PM
This is my first time using this, but I am not allowed to post the original document so I made one with the same layout but excluded the information that is not needed. The P column contains the list of flower names I'd like to use for the search. How do I upload excel document?
Nov 22, 2017 at 10:00 PM
Just to make certain, you want us to write code that will delimit the cell input, and place the delimited result in another cell?