INDIRECT and INDEX error

aaron1000

New Member
Joined
Jun 9, 2011
Messages
10
Hi Folks, I am migrating a number of formulas to make use of the INDIRECT funtion (see history here http://www.mrexcel.com/forum/showthread.php?t=556583).

One formula is giving me difficulties. It grabs the last value of a column in a worksheet and displays it in a 'calcs' worksheet.

I have it working correctly when pasted into individual worksheets:
=INDEX(C:C,MATCH(9.99999999999999E+307,C:C))

but when I move it to my 'calcs' worksheet and add in the indirect funtion to reference the original worksheet, I get the old #REF error which I believe its telling me it can't resolve the location:
=INDEX(INDIRECT("'"&ROW()&"'!C"):INDIRECT("'"&ROW()&"'!C"),MATCH(9.99999999999999E+307,INDIRECT("'"&ROW()&"'!C"):INDIRECT("'"&ROW()&"'!C")))

Appreciate any help on this.

cheers
Aaron
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
What is this supposed to return?

INDIRECT("'"&ROW()&"'!C")

If in A1 you would get:

INDIRECT('1'!C)

which is not a valid reference.
 
Upvote 0
Hi, so what your saying is that where '1'!C is referenced with INDIRECT("'"&ROW()&"'!C") isn't going to work because INDIRECT function can't be used as a column reference...only as a cell reference.

In that case is there another way I can increment the worksheet reference sequentially by one so that when I copy the formula down in the 'calcs' worksheet it automatically increments. For example the end result I want is:

=INDEX('1'!C:C,MATCH(9.99999999999999E+307,'1'!C:C))
=INDEX('2'!C:C,MATCH(9.99999999999999E+307,'2'!C:C))
=INDEX('3'!C:C,MATCH(9.99999999999999E+307,'3'!C:C))
.
.
.
=INDEX('250'!C:C,MATCH(9.99999999999999E+307,'250'!C:C))


cheers
Aaron
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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