# Look up

#### kaldag

##### New Member
I have column A that has values of 5,8,9,10,24 and I would like to have another column that shows if 5 is in column A then put a letter P in column B and if the value in A is 24 put a letter P in column B. I have been trying to use the vlookup function but don't quite sure why not working. I have three letters I need to use in column B.

Thanks

Ken

### Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

##### MrExcel MVP
On 2002-09-27 13:40, kaldag wrote:
I have column A that has values of 5,8,9,10,24 and I would like to have another column that shows if 5 is in column A then put a letter P in column B and if the value in A is 24 put a letter P in column B. I have been trying to use the vlookup function but don't quite sure why not working. I have three letters I need to use in column B.

Thanks

Ken

In B2 enter & copy down:

=IF(OR(A2={5,24}),"P","")

Is this what you're looking for?

#### kskinne

##### Well-known Member
place the following formula in B1, and copy it down to your last row of data:

=IF(OR(A1=5,A1=24)=TRUE,"P","")

is this what you are trying to do?

kevin

Replies
7
Views
178
Replies
12
Views
264
Replies
3
Views
232
Replies
0
Views
193
Replies
2
Views
466

1,171,211
Messages
5,874,379
Members
433,048
Latest member
Mrkall34

### 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