SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a column that needs to return the value of another column based on if the value in a third column = S

share|improve this question

You simply need to use IF statements:

For example:

=IF([Column1]<=[Column2], "OK", "Not OK")
share|improve this answer
What I'm trying to do is this: – Richard Kinkead Mar 4 '13 at 21:31
if column 4 = "S" then column 6 value if not then "0" – Richard Kinkead Mar 4 '13 at 21:32
In excel I would write it: – Richard Kinkead Mar 4 '13 at 21:33
=IF(A4="S",A6,"0") – Richard Kinkead Mar 4 '13 at 21:34
It works the same way Excel formulas do. For example: =IF([Column1]="S", [Column2], ""). – John Chapman Mar 4 '13 at 21:37

In addition to John's answer which seems best,

You can attach a Item Adding event to your list or you may able to use calculated columns.

Here's the code to give you an idea,

public override void ItemAdding(SPItemEventProperties properties)
        string newFieldValue = GetNewFieldValue();
        object oldFieldValue = properties.AfterProperties[COLUMN_NAME];
        if (oldFieldValue == null || oldFieldValue.ToString() != newFieldValue)
            properties.AfterProperties[COLUMN_NAME] = newFieldValue;
        //Log the error, or take another appropriate action.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.