File name shown in spreadsheet?

chaju

Board Regular
Joined
Mar 24, 2002
Messages
82
Hi It will be great if anyone could help me with this!

Suppose the file name is 'AA 26 Mar 02'
In Cell A1 (say) I have text 'BB 26 Mar 02'

If I save the file with new name to 'AA 27 Mar 02' how can Cell A1(say) change to 'BB 27 Mar 02' such that whenever I change the date within the filename will automatically change the date in Cell A1.

Thanks every one!!

Looking for your quick reply
 
Try again
="BB"&MID(CELL("filename"),FIND("[",CELL("filename"))+3,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-3)

or

="BB"&MID(CELL("filename"),FIND("[",CELL("filename"))+3,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-7)

to exclude the .xls

Richard
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
That's work very nice.. but however, Cell A1 will become other file name when I open other file and save the other file opened.

How should that be cured?

Thanks alot
 
Upvote 0
Not sure what you mean. If the formula is in Cell A1, Cell A1 will contain the filename, exluding the .xls, and replacing the first two charcters with AA. The formula
=CELL("filename") retunrs the full filename, including path a sheet name, you don't replace "filename" with youyr filename, you put it in exactly as it was posted.
Richard
 
Upvote 0
On 2002-03-26 22:18, chaju wrote:
That's work very nice.. but however, Cell A1 will become other file name when I open other file and save the other file opened.

How should that be cured?

Thanks alot

You need to change

CELL("filename")

to

CELL("filename",A1)

Aladin
 
Upvote 0
Hi Richard,,

I meant when File "AAA" is open with Cell A1 the formula you post up.. Cell A1 should give AAA.

However, when i open other file with File Name "BBBB" and save this file (while file "AAA" is still opened) the Cell A1 in File "AAA" will become "BBBB" is that strange..??
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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