# Formula HELP

#### bluefeather8989

##### Active Member
I need to make a formula that says

If A1 has a name in it then 101 if not 998

the names change from time to time so i cant be specific.

### Excel Facts

Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

#### rconverse

##### Well-known Member
What else would be in that cell?

#### sulakvea

##### Well-known Member
and, is there a pre-determined set of names that A1 may contain?

#### bluefeather8989

##### Active Member
What else would be in that cell?
persons first and last name only.

John Smith

A1 may have 1 name
A2 have another name and so on up to 32 diffrent names

A1 John Smith
A2 Chris Ling

Last edited:

#### bluefeather8989

##### Active Member
persons first and last name only.

A1 may have 1 name
A2 have another name and so on up to 32 difrent names

A1 John Smith
A2 Chris Ling

If it where numbers i would do

=If (A1>1,101,998)
with A1 having 101

but they are names not numbers so this wouldn't work

#### mgirvin

##### Well-known Member
Maybe this to check if there is text in the cell:

=IF(ISTEXT(A1),101,998)

#### mgirvin

##### Well-known Member
If you wanted to check against the actual names, maybe this:
Excel Workbook
ABCD
1name1101Names
21212998name1
4name3
5name4
6name5
7name6
8name7
9name8
...
Cell Formulas
RangeFormula
B1=IF(ISNUMBER(MATCH(A1,\$D\$2:\$D\$9,0)),101,998)
B2=IF(ISNUMBER(MATCH(A2,\$D\$2:\$D\$9,0)),101,998)
B3=IF(ISNUMBER(MATCH(A3,\$D\$2:\$D\$9,0)),101,998)

For your example the range \$D\$2:\$D\$9 would be changed to the range with the 32 names.

#### bluefeather8989

##### Active Member
Maybe this to check if there is text in the cell:

=IF(ISTEXT(A1),101,998)

Dude I think this what i am looking for. Thanks a bunch

Replies
4
Views
371
Replies
3
Views
91
Replies
1
Views
360
Replies
0
Views
446
Replies
1
Views
256

1,171,185
Messages
5,874,230
Members
433,039
Latest member
Izzy2091

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back