Find Row Number Using ROW Function and CELL Function in Dynamic Formula

rhratterman15

New Member
Joined
May 11, 2020
Messages
16
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
  2. Mobile
  3. Web
Hello My Good Men,

I am having troubles with a formula.

I am trying to find the row number of a specific cell. This Formula is intended to be dynamic.

This is my entire formula: =INDIRECT("'"&$A$2&" "&$B$2&"'"&"!A"&ROW(CELL("address",INDEX(INDIRECT("'"&$A$2&" "&$B$2&"'!$A$6:$A$76"),MATCH(A4,INDIRECT("'"&$A$2&" "&$B$2&"'!$A$6:$A$76"),0)))),TRUE)

I have isolated the issue to the ROW portion:

=CELL("address",INDEX(INDIRECT("'"&$A$2&" "&$B$2&"'!$A$6:$A$76"),MATCH(A4,INDIRECT("'"&$A$2&" "&$B$2&"'!$A$6:$A$76"),0))) evaluates to >>> '[Book1]Payroll 04.17.2020'!$A$6

If I place that value ('[Book1]Payroll 04.17.2020'!$A$6) inside the ROW function ("=ROW('Payroll 04.17.2020'!$A$6)") it evaluates to >>> 6 as it should.

Then why is it when I nest one inside the other ("ROW(CELL("address",INDEX(INDIRECT("'"&$A$2&" "&$B$2&"'!$A$6:$A$76"),MATCH(A4,INDIRECT("'"&$A$2&" "&$B$2&"'!$A$6:$A$76"),0))))") I get an error?

Any help would be much appreciated.

Thank you in advance!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
link to a CLOSED workbook
works with Index ✔
but not with Index(Indirect( ....)) ❌
 
Upvote 0
Here, to simplify my question why doesn't this work?:

=ROW(CELL("address",A13))

Thank you for trying to help me with this.
 
Upvote 0
Both of these formulas return STRING "$A$13" not a reference $A$13
=CELL("ADDRESS",A13)
=ADDRESS(ROW(A13),COLUMN(A13))

Both formulas ....
=ROW(CELL("ADDRESS",A13))
=ROW(ADDRESS(ROW(A13),COLUMN(A13)))

... evaluate to ...
=ROW("$A$13")

BUT you require
=ROW($A$13)

Convert string "$A$13" to reference $A$13 by wrapping value returned (by =CELL or =ADDRESS ) inside INDIRECT
=ROW(INDIRECT(CELL("address",A13)))
=ROW(INDIRECT(ADDRESS(ROW(A13),COLUMN(A13))))
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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