# Thread: IF with multiple conditions Thanks: 0 Likes: 0

1. ## IF with multiple conditions

Hi there,

Maybe someone can help me (is there any video/page I can watch?) as I am struggling to accomplish the following:

I have a huge list with post codes:
DN9 2BT
IP28 8PQ
DT6 4NG
F94 TP9N
LL20 8DD
RH1 2NB
YO22 5NH
TA8 2NZ
B48 7SQ
LL58 8YL

In the second column I want to insert a if statement (or other) that meets the following criteria,

If starts with,

 john pedro alex CA LL SY LA CH TF BD CW WV PR WN DY BB WA WR BL SK WS OL IM DE HX NG HD LN FY LE NN Any ideas? Thank you CV

Re-posted

3. ## Re: IF with multiple conditions

Hi - I might be able to help!

Can I clarify exactly what you are trying to do, you have your long list of postcodes, do you want them to be placed under the headings of the names?

4. ## Re: IF with multiple conditions

Let's try post#2 again!

Assuming that you can ALWAYS identify postcode to name with 2 leftmost characters

Maintain ONE list

Excel 2016 (Windows) 32 bit
A
B
1
2 first
characters
of PostCode
Name
2
CA john
3
LA john
4
BD john
5
PR john
6
BB john
7
BL john
8
OL john
9
HX john
10
HD john
11
FY john
12
LL pedro
13
CH pedro
14
CW pedro
15
WN pedro
16
WA pedro
17
SK pedro
18
IM pedro
19
SY alex
20
TF alex
21
WV alex
22
DY alex
23
WR alex
24
WS alex
25
DE alex
26
NG alex
27
LN alex
28
LE alex
29
NN alex
30
CV alex
31
 Sheet: Sheet2

And use VLOOKUP

Excel 2016 (Windows) 32 bit
A
B
C
1
PostCodes Name Formula in B2 copied down
2
DN9 2BT =IFERROR(VLOOKUP(LEFT(A2,2),Sheet2!A:B,2,0),"")
3
IP28 8PQ
4
DT6 4NG
5
F94 TP9N
6
LL20 8DD pedro
7
RH1 2NB
8
YO22 5NH
9
TA8 2NZ
10
B48 7SQ
11
LL58 8YL pedro
 Sheet: Sheet1