anglais428
Well-known Member
- Joined
- Nov 23, 2009
- Messages
- 634
- Office Version
- 2016
- Platform
- Windows
I would like to do the following:
Enter a search term into cell A1
Compare this search term with a lookup table (in range D1:D100)
If the text is found then it should return the word 'correct' in cell B1 and copy and paste the search term into a new range starting in cell A5
The text in cell A1 should then automatically be deleted (clear contents) and so that the next search term could be added and the above process would repeat.
If the search term is not found then the term "incorrect" should display in cell B1.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]<enter search term here>[/TD]
[TD]"correct" or "incorrect" text to be displayed here[/TD]
[TD][/TD]
[TD]Apples[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Bananas[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Oranges[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Pears[/TD]
[/TR]
[TR]
[TD]<list would start here>[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So If I entered "Apples" into cell A1, it would find it in the lookup list (column D), output the word "Apples" into cell A5, output the word "correct" into cell B1 and clear the contents of cell A1. Then if I entered the next word, Bananas, it would find it in the lookup list (column D), output the word "Bananas" into cell A6 (as Apples would be in cell A5), output the word "correct" into cell B1 and clear the contents of cell A1. If I entered "Food" then the word "incorrect" would be displayed in cell B1.
Enter a search term into cell A1
Compare this search term with a lookup table (in range D1:D100)
If the text is found then it should return the word 'correct' in cell B1 and copy and paste the search term into a new range starting in cell A5
The text in cell A1 should then automatically be deleted (clear contents) and so that the next search term could be added and the above process would repeat.
If the search term is not found then the term "incorrect" should display in cell B1.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]<enter search term here>[/TD]
[TD]"correct" or "incorrect" text to be displayed here[/TD]
[TD][/TD]
[TD]Apples[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Bananas[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Oranges[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Pears[/TD]
[/TR]
[TR]
[TD]<list would start here>[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So If I entered "Apples" into cell A1, it would find it in the lookup list (column D), output the word "Apples" into cell A5, output the word "correct" into cell B1 and clear the contents of cell A1. Then if I entered the next word, Bananas, it would find it in the lookup list (column D), output the word "Bananas" into cell A6 (as Apples would be in cell A5), output the word "correct" into cell B1 and clear the contents of cell A1. If I entered "Food" then the word "incorrect" would be displayed in cell B1.