So i have tried this code, and its not working. I want to change the value in Cell C17 based on the value in C8
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C8").Value = "YES" Then
Range("C17").Value = "=IF(AND(C6=0,C7=0),0,IF(SUM(C6*C10)+SUM(C7*75)+SUM(E18:E19)<220,220,SUM(C6*C10)+SUM(C7*75)+SUM(E18:E19)))"