Tuesday, April 5, 2011

Geek Stuff: Microsoft Excel IF function to query text and populate to another cell

=IF(LEFT(A492,2)="SU","SUGGESTION",IF(LEFT(A492,2)="BU","BUG","?"))

This query means: look at left 2 char in cell A492, if it says SU then populate [this] field with the word SUGGESTION. If cell says BU then populate [this] field with the word BUG. If it is neither SU or BU then populate field with the character ?

=IF(B491="Critical","BUG",IF(B491="High","BUG",IF(B491="Significant","BUG",IF(B491="To be Confirmed","?","SUGGESTION"))))

This query means: look at cell B491, if it says "Critical" (or "High" or "Significant" - *note* there are 3 IFs for this) then populate [this] field with the word "BUG". 4th IF: if cell B491 = phrase "To be Confirmed" then populate with the character ?, otherwise populate field with the word SUGGESTION.

*Don't forget to count all the open brackets and make sure you have the same amount of closing brackets at the end.

LinkWithin

Related Posts Plugin for WordPress, Blogger...