# Exact Matching used in formula

#### g4defender

##### New Member
Hi All

I have the following formula that references a row that contains a two digit code, that then automatically imports data into another worksheet based on that two digit code. The problem I have is that this two digit code can be GD or Gd and mean two different things.

Am I able to manipulate this code to do an exact match to differentiate between the two.

{=IF(COUNTIF('Data 2019'!\$A\$1:\$A\$517,\$A\$2)<ROWS(\$B\$1:B1),"",INDEX('Data 2019'!\$B\$1:\$B\$517,SMALL(IF('Data 2019'!\$A\$1:\$A\$517=\$A\$2,ROW('Data 2019'!\$A\$1:\$A\$517)),ROW('Data 2019'!A1))))}

Any help would be gratefully received.

I know i need to put in possibly a true or exact in somewhere but not sure where.

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
This is the full formula =IF(COUNTIF('Data 2019'!\$A\$1:\$A\$517,\$A\$2)<ROWS(\$C\$1:C1),"",INDEX('Data 2019'!\$C\$1:\$C\$517,SMALL(IF('Data 2019'!\$A\$1:\$A\$517=\$A\$2,ROW('Data 2019'!\$A\$1:\$A\$517)),ROW('Data 2019'!B1))))

=\$A\$2,ROW('Data 2019'!\$A\$1:\$A\$517) is the column that I am looking at in the source sheet and \$A\$2 is where i am entering in either GD or Gd.

Code:
``=IF(COUNTIF('Data 2019'!\$A\$1:\$A\$517,\$A\$2)<ROWS(\$C\$1:C1),"",INDEX('Data 2019'!\$C\$1:\$C\$517,SMALL(IF('Data 2019'!\$A\$1:\$A\$517=\$A\$2,ROW('Data 2019'!\$A\$1:\$A\$517)),ROW('Data 2019'!B1))))``

Replies
8
Views
292
Replies
1
Views
236
Replies
3
Views
683
Replies
3
Views
249
Replies
5
Views
218

1,196,485
Messages
6,015,472
Members
441,898
Latest member
kofafa

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