Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I use the functions IF/Then to change the color of a cell?

How can I use the functions IF/Then to change the color of a cell?

i.e. use a scanned barcode: search the document/ colum , if found change the color green.

Numbers-OTHER, OS X Mountain Lion (10.8.2)

Posted on Feb 16, 2013 12:23 PM

Reply
4 replies

Feb 16, 2013 12:52 PM in response to gmcra19

GM,


The actual change of format will be done by the Conditional Format feature in the Cells Inspector. It's possible that there will be a role in that for the IF function, depending on the approach you choose.


If I follow your description, you will have a cell with the result of a barcode scan and you want that cell's background fill to change if it represents a value that is found in a range of other cells.


The exact implementation would depend on how the scan code got there. If by direct entry, you would have to have an auxiliary cell to compute the match. If the code is transferred from elsewhere it would be possible to do the conditional format directly.


Jerry

Feb 17, 2013 5:55 AM in response to gmcra19

You'll be best served if you add a column to the QR Code table, and Hide the actual data table. I suggest that the list of personal device serial numbers be in a separate table. There's just no need to try to integrate the database with the scan data into a single table. Same sheet is fine, but I'd keep the tables separate. Let's call the scan data table Scan and the historical inventory table History.


in column B of Scan, write:


=IF(COUNTIF(History :: A,A)>0, " "&A, A)


Here's the screen shot:


User uploaded file


I used three spaces ahead of the copied QR Code to detect found codes. I could have used another character or number of characters. I used three so that it would cause an offset in the alignment, making the detected addresses more obvious before applying the formatting.


The Results column has a Conditional Format: Text starting with three spaces gets a Green background and a value of zero gets a faint font color. You can adjust these signals any way you wish.


Jerry

How can I use the functions IF/Then to change the color of a cell?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.