How to use if function - correct syntax please

lynne bowen 40 Reputation points
2026-11-05T01:32:55.27+00:00

I havent used functions for a while - need to know correct syntax for -

If col e = boost col o e b/o but if col e = qkr paid col o = taken

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

Answer accepted by question author
Marcin Policht 112.5K Reputation points MVP Volunteer Moderator
2026-11-05T02:15:46.6733333+00:00

Try:

=IF(E2="boost","e b/o",IF(E2="qkr","taken",""))

This checks column E and returns:

If E2 = boost, column O displays e b/o.

If E2 = qkr, column O displays taken.

Otherwise, column O remains blank.

Enter the formula in O2 and drag it down.


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

AI answer

2026-11-05T01:33:26.92+00:00

Enter this formula in the first applicable cell in column O—for example, O2—and then fill it down:

=IF(E2="boost","e b/o",IF(E2="qkr paid","taken",""))

This assumes the required logic is:

  • If E2 contains boost, return e b/o
  • Otherwise, if E2 contains qkr paid, return taken
  • Otherwise, return a blank cell

Excel’s syntax is IF(condition, value_if_true, value_if_false), and text must be enclosed in quotation marks.^1^ Multiple tests can be handled by placing the second IF inside the first one.^2^

If your data starts on a different row, replace 2 with that row number. The text in column E must match the spelling, including spaces; capitalization does not matter for a normal IF comparison.


References

  1. IF function | Microsoft Support
  2. EXCEL - IF formula based on cell value or entry - Microsoft Q&A
AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.