#1   Report Post  
Old April 7th 08, 10:56 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 1,389
Default How the heck?

Could someone please explain to me how the following function works?

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Many thanks - Dave.

  #2   Report Post  
Old April 7th 08, 11:08 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 3,355
Default How the heck?

Save your file and you'll see the result.
--
HTH,
Barb Reinhardt



"Dave" wrote:

Could someone please explain to me how the following function works?

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Many thanks - Dave.

  #3   Report Post  
Old April 7th 08, 11:44 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 22,908
Default How the heck?

See Bob Phillips' site for the "how" part.

http://www.xldynamic.com/source/xld.xlFAQ0002.html


Gord Dibben MS Excel MVP

On Mon, 7 Apr 2008 14:56:19 -0700, Dave wrote:

Could someone please explain to me how the following function works?

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Many thanks - Dave.


  #4   Report Post  
Old April 8th 08, 12:16 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 1,389
Default How the heck?

Hi Gordon,
Thanks for the link.
Dave.
  #5   Report Post  
Old April 8th 08, 12:37 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2007
Posts: 353
Default How the heck?

The Cell function returns information about the given cell, if the info type
(first argument) of filename is requested, the returned info is the complete
path to that cell - for example:
C:\Users\UserName\Documents\[sample.xlsx]Sheet1

The Find function is looking for the first instance of a right square
bracket in the filename info, which indicates the end of the workbook name,
and returns its character position

The Mid function is therefore taking the location of the ] in the path to
the current cell, and starting in the next position, returning up to the next
255 characters, which will be your sheetname.

Does that help?


"Dave" wrote:

Could someone please explain to me how the following function works?

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Many thanks - Dave.



  #6   Report Post  
Old April 8th 08, 02:44 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 1,389
Default How the heck?

Yes, thank-you. I like to understand what I use. Thanks for taking the effort.
Dave.

"BoniM" wrote:

The Cell function returns information about the given cell, if the info type
(first argument) of filename is requested, the returned info is the complete
path to that cell - for example:
C:\Users\UserName\Documents\[sample.xlsx]Sheet1

The Find function is looking for the first instance of a right square
bracket in the filename info, which indicates the end of the workbook name,
and returns its character position

The Mid function is therefore taking the location of the ] in the path to
the current cell, and starting in the next position, returning up to the next
255 characters, which will be your sheetname.

Does that help?


"Dave" wrote:

Could someone please explain to me how the following function works?

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Many thanks - Dave.

  #7   Report Post  
Old April 8th 08, 03:34 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2007
Posts: 353
Default How the heck?

You're very welcome... it's refreshing to hear from people who want to
understand instead of just wanting it done!

"Dave" wrote:

Yes, thank-you. I like to understand what I use. Thanks for taking the effort.
Dave.

"BoniM" wrote:

The Cell function returns information about the given cell, if the info type
(first argument) of filename is requested, the returned info is the complete
path to that cell - for example:
C:\Users\UserName\Documents\[sample.xlsx]Sheet1

The Find function is looking for the first instance of a right square
bracket in the filename info, which indicates the end of the workbook name,
and returns its character position

The Mid function is therefore taking the location of the ] in the path to
the current cell, and starting in the next position, returning up to the next
255 characters, which will be your sheetname.

Does that help?


"Dave" wrote:

Could someone please explain to me how the following function works?

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Many thanks - Dave.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide and unhide...what the heck!!?? LeahT Excel Discussion (Misc queries) 6 March 21st 08 02:10 AM
I am stupid and don't know what the heck I am doing wrong on this pivot table!!! Chris Excel Worksheet Functions 10 September 10th 06 02:18 AM
I am stupid and don't know what the heck I am doing wrong on this pivot table [email protected] Excel Discussion (Misc queries) 1 September 9th 06 10:24 PM


All times are GMT +1. The time now is 12:45 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017