Sheet Name Formul

rikvny02

Board Regular
Joined
Aug 9, 2022
Messages
95
Office Version
  1. 365
Platform
  1. Windows
When using the Sheet name formula excel is not allowing me to reference that cell with another formula. Any ideas?

=TEXTAFTER(CELL("filename",A1),"]")

Then I am trying to use a simple vlookup based off the cell with the file name.

=IFERROR(VLOOKUP($C$2,options!$E:$F,2,0),"")
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
It seems to work for me. Try checking the ranges.

T202312a.xlsm
CD
25a88
388
5a
Cell Formulas
RangeFormula
D2D2=VLOOKUP($C$2,$E:$F,2,0)
D3D3=IFERROR(VLOOKUP($C$2,Options!$E:$F,2,0),"")
 
Upvote 0
It seems to work for me. Try checking the ranges.

T202312a.xlsm
CD
25a88
388
5a
Cell Formulas
RangeFormula
D2D2=VLOOKUP($C$2,$E:$F,2,0)
D3D3=IFERROR(VLOOKUP($C$2,Options!$E:$F,2,0),"")
Its weird because my formulas are correct. If i remove the formula from c2 and enter the sheet name manually the Vlookups work just fine.
 
Upvote 0
Try evaluating each part of the formula. What is in each of the relevant cells?

T202312a.xlsm
CDEF
1This Sheet
25a88
3200
45a88
52c99
6
5a
Cell Formulas
RangeFormula
C2C2=TEXTAFTER(CELL("filename",A1),"]")
D2D2=VLOOKUP($C$2,E4:F5,2,0)
D3D3=VLOOKUP($C$2,Options!E4:F8,2,0)


T202312a.xlsm
BCDEFG
1This SheetOptions
2
3
45a200
52c100
6
7
Options
Cell Formulas
RangeFormula
D1D1=TEXTAFTER(CELL("filename",A1),"]")
 
Last edited:
Upvote 0
Do you have the below formula in cell c2
=TEXTAFTER(CELL("filename",A1),"]")

I even tried another version and again no results. =MID(CELL("filename",C2),FIND("]",CELL("filename",C2))+1,255)
 
Upvote 0
Please advise what is in each of the relevant cells

Please expand on what you are trying to do.


Please check post #4
 
Upvote 0
Sorry but I'm at work and can not download the add-in to upload a sample sheet

1702585789785.png
1702585895804.png


C2= the employees number
C1= should return the employees name
As you can see the formula in C2 does return the sheet name. but the vlookup formulas do not return any values. If i manually type the emp# (3021) into cell C2 all the formulas populate the correct information. Ive tried to change the cell format and nothing. Im just at a loss.
 
Upvote 0
I found this answer which makes complete sense, but how do i get around this issue. Unfortunately its important to the end user to have the sheet name be the employee number.

1702586635175.png
 
Upvote 0
Solved. All we needed to do was use the Value function.

=VALUE(TEXTAFTER(CELL("filename",A1),"]"))

Dave thanks for all your help.
 
Upvote 0
Solution
"Solved.". Great that you solved your problem.

It would really help readers of the forum if you showed what you were trying to do and how you solved it.
Dave
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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