I have two different workbooks that I am working out of. I want to take the data from workbook one, rank it, read it, and change the cell color based on what other cell values were.
I have not worked in VBA before, but have in other languages a bit.
I have not been able to get this to work just using functions in the cell either.
I'm thinking my code should go somewhat as follows.

Lookup by truck number
Rank by date
If lead = 1 copper = 1 sodium = 1 and potassium is between 0 and 6
Put in date and turn cell green
If lead = 2 copper = 2 sodium = 2 and potassium is between 6 and 10
Put in date, high sample (copper = 2) and turn yellow
If lead = 3 or higher copper = 3 or higher sodium = 3 or higher and potassium is 10 or higher
Put in date, high sample (copper = 3) and turn red
If water or anti-freeze > 0
Put in date, high sample (anit-freeze) and turn red


Any direction would be a great help!

Thanks!