I have two sheets Sheet 1

```Country PMU             Cluster
A       Asia            Mercury
B       Australia       Venus
C       North America   Jupiter
```

All the countries and continents are unique here In sheet 2 I have

```CountryCode Country  PMU  Cluster
123         A
234         A
453         B
235         C
```

One country may have several codes. The PMU and Cluster must be combined with Sheet 2; Sheet 2 will include a new column for the country code. Any assistance is greatly appreciated.

Nov 13, 2022 in Others 329 views

## 1 answer to this question.

Here is the formula for cell G2:

```    ==VLOOKUP(\$F2,\$A:\$C,2,FALSE)
```

Here is the formula for cell H2:

`    =VLOOKUP(\$F2,\$A:\$C,3,FALSE)`

You can now drag your formulas down to finish. Vlookup formulae are really helpful, and I suggest researching how they work because someone else might be able to describe it better than I can. In essence, you are looking up a value (column F) in an array (columns A, B, C), and if a match is found, you return a column index (B = 2, C = 3, etc.). Last but not least, you are searching for a close (TRUE) or exact (FALSE) match. Apply FALSE almost always.

Additionally, research cell references and how to lock them (including the various \$ sign rules). By maintaining the same lookup value and array, you may quickly drag formulas across the page.

• 63,700 points

## How to use Excel VLOOKUP function with words that begin with the letters AB

If you lookup "AB" in Excel, it ...READ MORE

## How do I use the Indirect Function in Excel VBA to incorporate the equations in a VBA Macro Function

Try this: Sub Test() Dim str As String: str ...READ MORE

## How to open .xlsx files in MS Excel from VS Code?

Hello, to open xlxs files, or files ...READ MORE

## Excel-VBA - How to identify Target range (more than 1 cell) is deleted in a Worksheet_Change function?

You misunderstand the purpose of the function ...READ MORE

## Excel stock and sales data management

you must attach the event handler each ...READ MORE

## Using Excel VLOOKUP() function across two sheets

The syntax for VLOOKUP is VLOOKUP(Lookup_Value,Table Array,Col_index_num,Range_lookup) OR, to start in ...READ MORE

## Way to overcome Excel Vlookup function limit of 256 characters

If you are using VLOOKUP like this: =VLOOKUP(A2,D2:Z10,3,FALSE) i.e. ...READ MORE

## Convert three letter country codes to full country names

Just create a list to be used in ...READ MORE