# Help with Excel Formula

**URL:** <https://forum.kirupa.com/t/help-with-excel-formula/318627>\
**Category:** programming\
**Created:** [January 25, 2011, 6:06pm UTC](https://forum.kirupa.com/t/help-with-excel-formula/318627 "2011-01-25T18:06:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam1](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Adam1](https://forum.kirupa.com/u/Adam1)\
**Post date:** [January 25, 2011, 6:06pm UTC](https://forum.kirupa.com/t/help-with-excel-formula/318627/1 "2011-01-25T18:06:45Z")

</div>

Hi, all. I’m hoping someone here can give me a hand. I’ve been at this for over a week and I’ve tried everything I could think of. I’m not great with Excel, so I’m hoping there is a way to do what I want.

I have 10 cells in a row - A1-A10 for instance. Each cell will have a letter in it - the letters are determined from a list of about 8 possibilities. The letters I am concerned with are “R” and “D”. What I need to be able to figure out is, from left to right (A1-A10) if a cell has an “R” in it, then a cell to it’s right (anywhere in the row) has a “D”. But I need to know if this happens twice. For instance, if the letters went like this:

**R** T T H R **D** F **R** T **D** - this works, because there is a string of “R D R D” in it.

R R R D T T H D R R - this doesn’t work because there isn’t an “R D R D” there.

I hope that makes sense. I’ve attached a simple file with letters in cells. If anyone has an idea, I’d love to hear it. Thanks in advance for any help.

Adam
