refrencing problem

johngio

Board Regular
Joined
Jan 28, 2005
Messages
174
I'm trying to get some row numbers so I may run a countif function. However, I am getting a #N/A error.

My formula is:

=(MATCH(INDEX(N3,1,1),'Sheet2'!A2:A10000, 0))+1

cell N3 is a reference to another cell (=A6; A6 = =DATE(YEAR(C2),MONTH(C2),DAY(1)))

'Sheet2'!A2:A10000 is a whole bunch of dates, once again referenced from another sheet (e.g. 'Sheet2'!A2 = 'Raw data'!A2)

I figure my referencing in my MATCH formula.

Any ideas ? ?

Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi

Worked for me. Do you have data in sheet2 that actually matches? If there is no match, you will get the error.


Tony
 
Upvote 0
mustbe a problem with my referencing to sheet 2
when i enter the date manually in sheet 2 the formula works, but it won't recognise it normally (because the dates in sheet2 are referenced from another sheet. E.g. cell A500 will contain =sheet3 A500

Hmmm. . ...
 
Upvote 0
johngio said:
I'm trying to get some row numbers so I may run a countif function. However, I am getting a #N/A error.

My formula is:

=(MATCH(INDEX(N3,1,1),'Sheet2'!A2:A10000, 0))+1

cell N3 is a reference to another cell (=A6; A6 = =DATE(YEAR(C2),MONTH(C2),DAY(1)))

'Sheet2'!A2:A10000 is a whole bunch of dates, once again referenced from another sheet (e.g. 'Sheet2'!A2 = 'Raw data'!A2)

I figure my referencing in my MATCH formula.

Any ideas ? ?

Thanks

Since N3 is a single-cell range, I don't see why you're wrapping it inside an INDEX.
 
Upvote 0
My bad..

The formula is actually :

=(MATCH(N3,'Sheet2'!A2:A10000, 0))+1

ignore that index from before
 
Upvote 0
johngio said:
My bad..

The formula is actually :

=(MATCH(N3,'Sheet2'!A2:A10000, 0))+1

ignore that index from before

If you're getting #N/A while you shouldn't, then there is mismatch between the data type of the value in N3 and the data type of the values in 'Sheet2'!A2:A10000.
 
Upvote 0
got it; yeh there were times in next to the dates that i didn't see and didn't come up when i displayed the cell value (not my spreadsheet). That was adding a couple of decimals onto the date, and hence I couldn't get an exact match. So I changed the formula (0 changed to 1):

=(MATCH(N3,'Sheet2'!A2:A10000, 1))+1

woohoo!!
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,240
Members
448,555
Latest member
RobertJones1986

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