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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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,223,635
Messages
6,173,479
Members
452,516
Latest member
archcalx

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