Force Cell Value based on other cells

New Contributor



I am looking for help on how to force a cell to have a specific value only if certain criteria is met, otherwise the cell can have other values.

YES   5001000


I want column A to always be "YES" if the sum(B:F)>0, otherwise A can be YES, or NO. How can I accomplish this?

3 Replies
That means the answer is always "no" if the sum is not greater then 0. I want people to be able to type in or select from "Yes" or "No". I think I need to use data validation of some sort but I am not sure how.
best response confirmed by KaylaStarr (New Contributor)


Enter YES and NO in two cells, e.g. in M1 and M2.

Let's say row 1 contains headers, and you have data in rows 2 to 50.

Select A2:A50. A2 should be the active cell in the selection.

On the Data tab of the ribbon, click Data Validation.

Select List from the Allow drop down.

Enter the following in the Formula box:


Click OK.

This will let users select only YES in column A if the sum of columns B to F is positive, but it doesn't automatically change the value of column A to YES. If you want that, you'd need a bit of VBA code.