As i scan a upc code if it match cell next to it change background color

i have to verify a collection of items. I am scanning the upc code to a cell and if it matches the cell next to it change the background color. i thought i had it but its not working quite right.
Note: i’m on MacOS 12.7 Libreoffice 24.2

Hi @Librarian1, please post an example file, with the information you want, as an answer.

since i have never posted before I making posting mistakes.
this is the test file to work out the how to. this is the file.
All the ones I have scanned so far should be green (Column A)
trest 8.ods (26.6 KB)

If you Click View > Value Highlighting you will see that some of the strings in in column B are numbers (coloured blue). As they should be text select the column B and then click Data > Text to columns, OK. The numbers will turn black indicating they are now text and the conditional formatting will change the matches to green.
.
Note, I think the entire column is already formatted as Text, although not all the contents, but in the Text to columns dialogue, you could select the column and change the column type to Text to be doubly sure before clicking OK.

A most humble thank you for the education. I have learnt a lot trying to solve this myself but had not come across that tid bit for the final solution. I have always had great respect for those who whirle the magic of spreadsheet type products. thank you for putting in the last piece of my puzzle.