Match Formula

Patcheen

Active Member
Joined
Sep 28, 2015
Messages
391
Office Version
  1. 365
Platform
  1. Windows
im using this formula to match dates but its not matching exactly its out by a few days

=IFERROR("A "&MATCH(B4,'Shirt Database'!$G$2:$G$60000,0),"")

b4 is the date im trying to match in 'Shirt Database'!$G$2:$G$60000 but as i say its not doing so its out by few days example b4 could be any date so im gonna use 04/05/91 but it returns 24/3/91 as i say it is only out by few days
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I don't understand what you are trying to do.
The MATCH function returns the relative position of the lookup_value.
So, for example, if B4 (04/05/91) is found in G3 - the second cell of the range 'Shirt Database'!G2:G60000 - it returns 2, never a date.

M.
 
Upvote 0
G in the 'Shirt Database'!$G$2:$G$60000 is where the dates are - ur right im trying to find the location of where the date im looking for is in the Shirt Database sheet
 
Upvote 0
What happens if you just enter a MATCH expression?
=MATCH(B4,'Shirt Database'!$G$2:$G$60000,0)
Do you get the right number?

Are your dates all entered in the same format? All are numbers - none are text values?
Do you have a filter or hidden rows on Shirt Database?
 
Upvote 0
yes you are correct it gives me the location of where it should be but it gives me the location that is a few days away from the date im looking for
example date 24/3/91 is in G1000 in the 'Shirt Database sheet but it returns the location G996 instead of location G1000

 
Upvote 0
What happens if you just enter a MATCH expression?
=MATCH(B4,'Shirt Database'!$G$2:$G$60000,0)
Do you get the right number?

Are your dates all entered in the same format? All are numbers - none are text values?
Do you have a filter or hidden rows on Shirt Database?

yes the dates are formatted as dates, no text value no hidden rows or filters,

your formula gets me closer it get me to 1 row away from the perfect result
 
Upvote 0
I'm not following this too well.
You said in your first reply:
example date 24/3/91 is in G1000 in the 'Shirt Database sheet but it returns the location G996 instead of location G1000
In your second reply, you said:
your formula gets me closer it get me to 1 row away from the perfect result
Are you 1 row or 4 rows away??
Are all your dates in G2:G60000 sorted in ascending or descending order?
Have you tried it with different dates? Are you consistently 1 (or 4) rows off for each date?
 
Upvote 0
1 row away... the dates are in accending order up to present date. yes tried with diff dates
 
Upvote 0
If you are consistently just 1 row away, then you might have an incorrect range in your formula.
Or you can just add or subtract 1 from the result to get where you need.
=MATCH(B4,'Shirt Database'!$G$2:$G$60000,0)+1
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,204
Members
453,022
Latest member
RobertV1609

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