Using Tab Name As Search Value - Issues using Cell("filename")

AlInVegas2

New Member
Joined
Jun 19, 2019
Messages
25
I have a list of records where the SearchName column is in alphabetical order. There are multiple records with the same name entered. I then have multiple tabs, one for each individual listed in the SearchName column. I use the following two formulas in each tab to get the rows for the first and last record for each individual. The issue is, when calculating the value on one tab, all the other tabs get updated to the same value. Is there a better command that won't change based on the users active cell location?

First Record =MATCH(RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename"))),SearchName,0)
Last Record =MATCH(RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename"))),SearchName,1)


EDIT:
I just updated the formulas using TextAfter(Cell("filename"),"]").... same result

First Record =MATCH(TEXTAFTER(CELL("filename"),"]"),SearchName,0)
Last Record =MATCH(TEXTAFTER(CELL("filename"),"]"),SearchName,1)
 
Last edited by a moderator:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Except in very specific circumstances, you should always include a cell reference when using CELL to anchor it to a specific sheet - i.e. use CELL("filename",A1) not just CELL("filename")
 
Upvote 0
Solution

Forum statistics

Threads
1,224,802
Messages
6,181,048
Members
453,014
Latest member
Chris258

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