Date within file name in cell

Slade

New Member
Joined
Aug 5, 2011
Messages
26
Hi

I am tying to insert a date from another cell on another sheet to a cell that contains a filename that must have a date. it does get the value but changes it to a random number. how can i fix this?

Sheet1, Cell A1 is the date: 20110804
Sheet2, Cell A1 is the filename with date:

Formula is:"=IA_Hoops__"&DATE!$B$3&".csv"
Value that i get is: ="IA_Hoops__40759.6666666667.csv"
The "40759.6666666667" is suppose to be the date from A1 sheet1

Tnx
 
CELL("filename") was not meant for you to substitute anything. You literally have to write:

CELL("filename")
not
CELL("c:\x.txt") or anything else.

If you type =CELL("filename") into a cell you'll see what I mean.
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Ooo ok sorry. For testing i use a file directly on my c:\ drive. the exact root is C:\dir20110808075125.txt. Other wise the other files are also txt files just on a server but the code will stay the same because it is a mapped drive.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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