IF with multiple conditions

samuelmaiia

New Member
Joined
Jul 21, 2019
Messages
1
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,



johnpedroalex
CALLSY
LACHTF
BDCWWV
PRWNDY
BBWAWR
BLSKWS
OLIMDE
HXNG
HDLN
FYLE
NN
Any ideas?


Thank you
CV

<tbody>
</tbody>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Re-posted
 
Last edited by a moderator:
Upvote 0
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?
 
Upvote 0
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
CAjohn
3
LAjohn
4
BDjohn
5
PRjohn
6
BBjohn
7
BLjohn
8
OLjohn
9
HXjohn
10
HDjohn
11
FYjohn
12
LLpedro
13
CHpedro
14
CWpedro
15
WNpedro
16
WApedro
17
SKpedro
18
IMpedro
19
SYalex
20
TFalex
21
WValex
22
DYalex
23
WRalex
24
WSalex
25
DEalex
26
NGalex
27
LNalex
28
LEalex
29
NNalex
30
CValex
31
Sheet: Sheet2

And use VLOOKUP

Excel 2016 (Windows) 32 bit
A
B
C
1
PostCodesName 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 8DDpedro
7
RH1 2NB
8
YO22 5NH
9
TA8 2NZ
10
B48 7SQ
11
LL58 8YLpedro
Sheet: Sheet1
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,288
Members
448,563
Latest member
MushtaqAli

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top