# What formula works for this

#### richardthelionheart

##### Board Regular
I need to create a formula to solve this question (put in plain english) so I ask Excel:
Look for x in the following cells AI89:AM94 and if you find x put an x otherwise put a 1 if you can only find numbers
Any help is greatly appreciated.

### Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

#### philwojo

##### Well-known Member
Not totally sure this is what you want, but you can try it. This doesn't care if it finds more than one "x" in your range, it just looks in that range and says if there is 1 or more X's then put an X where you place this formula, otherwise put the number 1.

Code:
``=IF(COUNTIF(\$AI\$89:\$AM\$94,"x")>1,"x",1)``

See if this works for you.

#### richardthelionheart

##### Board Regular
Not totally sure this is what you want, but you can try it. This doesn't care if it finds more than one "x" in your range, it just looks in that range and says if there is 1 or more X's then put an X where you place this formula, otherwise put the number 1.

Code:
``=IF(COUNTIF(\$AI\$89:\$AM\$94,"x")>1,"x",1)``

See if this works for you.

Yes, that worked perfectly. Thank you very much philwojo.

Replies
3
Views
84
Replies
4
Views
33
Replies
4
Views
107
Replies
1
Views
79
Replies
4
Views
73