Forum

Notifications
Clear all

How to used exact match in this formula please

5 Posts
2 Users
0 Reactions
47 Views
(@g4defender)
Posts: 11
Active Member
Topic starter
 

I have a spreadsheet that uses this formula, that returns results based on a two digit code in a row in the source sheet.
The two digit code can have data like GD or Gd which means different things, when I run the code it does not differentiate between the two and places the data GD and Gd into the samesheet rather than one for GD and one for Gd.

 

Below is the 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))))}

I know that I will need to put an exact command somewhere but not sure.

=$A$2,ROW('Data 2019'!$A$1:$A$517)),ROW('Data 2019'!B1))))} is where it looks for the GD or Gd.

 

Thank you for your help in advance.

 
Posted : 04/02/2019 10:31 pm
(@debaser)
Posts: 836
Member Moderator
 

You'd need:

 

IF(EXACT('Data 2019'!$A$1:$A$517,$A$2)

 

instead of:

 

IF('Data 2019'!$A$1:$A$517=$A$2

 

Ideally, you'd also use SUMPRODUCT and EXACT instead of the COUNTIF, or use an IFERROR.

 
Posted : 05/02/2019 12:16 pm
(@g4defender)
Posts: 11
Active Member
Topic starter
 

Thank you Velouria, for answering the question.
I never wrote the formula, could you explain what the difference would be using SUMPRODUCT or IFERROR, and what the outcomes would be. 🙂

And Also I am now getting the following error "Too Few arguments" when I have entered the formula
{=IF(COUNTIF('Data 2019'!$A$1:$A$517,$A$2)<ROWS($B$1:B1),"",INDEX('Data 2019'!$B$1:$B$517,SMALL(IF(EXACT('Data 2019'!$A$1:$A$517=$A$2,ROW('Data 2019'!$A$1:$A$517)),ROW('Data 2019'!A1)))))}

Sorry for all the questions this one is way to complicated for me. Happy to attach a copy of the spreadsheet

 
Posted : 06/02/2019 3:35 am
(@debaser)
Posts: 836
Member Moderator
 

That's not quite what I suggested. It should be this:

 

IF(EXACT('Data 2019'!$A$1:$A$517,$A$2)

 

not this:

 

IF(EXACT('Data 2019'!$A$1:$A$517=$A$2

 

A sample workbook would certainly make life simpler too. 🙂

 
Posted : 06/02/2019 4:27 am
(@g4defender)
Posts: 11
Active Member
Topic starter
 

Awesome, this has worked so well, I really am thankful for your help.

I should acutally read what is writtens 🙂

 
Posted : 07/02/2019 7:11 am
Share: