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

AlInVegas2

New Member
Joined
Jun 19, 2019
Messages
20
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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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