Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How to retrieve the number?

Does anyone have any suggestions on how to retrieve the number from filename?

Let assume that only 1 number existed within each filename, which could be
any number from 0 to 1000, such as "Eric - UP 4 R.xls". I would like to
remove all characters of the filename except the number, and return this
number into cell A2.

Does anyone have any suggestions?
Thank anyone for any suggestions
Eric

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How to retrieve the number?

Let assume that only 1 number existed within each filename, which could be
any number from 0 to 1000


Try this:

=LOOKUP(10000,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&
"0123456789")),ROW(INDIRECT("1:4"))))

If any numbers have leading 0s they'll get dropped.

--
Biff
Microsoft Excel MVP


"Eric" wrote in message
...
Does anyone have any suggestions on how to retrieve the number from
filename?

Let assume that only 1 number existed within each filename, which could
be
any number from 0 to 1000, such as "Eric - UP 4 R.xls". I would like to
remove all characters of the filename except the number, and return this
number into cell A2.

Does anyone have any suggestions?
Thank anyone for any suggestions
Eric



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How to retrieve the number?

Thank you very much for your suggestions
There is no written filename in cell A1, do you have any suggestions on how
to retrieve the filename for this worksheet and combine it with your coding?
Thank you very much for any suggestions
Eric

"T. Valko" wrote:

Let assume that only 1 number existed within each filename, which could be
any number from 0 to 1000


Try this:

=LOOKUP(10000,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&
"0123456789")),ROW(INDIRECT("1:4"))))

If any numbers have leading 0s they'll get dropped.

--
Biff
Microsoft Excel MVP


"Eric" wrote in message
...
Does anyone have any suggestions on how to retrieve the number from
filename?

Let assume that only 1 number existed within each filename, which could
be
any number from 0 to 1000, such as "Eric - UP 4 R.xls". I would like to
remove all characters of the filename except the number, and return this
number into cell A2.

Does anyone have any suggestions?
Thank anyone for any suggestions
Eric




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default How to retrieve the number?

The CELL function will let you retrieve the filename. Details in Excel
help.
--
David Biddulph

"Eric" wrote in message
...
Thank you very much for your suggestions
There is no written filename in cell A1, do you have any suggestions on
how
to retrieve the filename for this worksheet and combine it with your
coding?
Thank you very much for any suggestions
Eric

"T. Valko" wrote:

Let assume that only 1 number existed within each filename, which could
be
any number from 0 to 1000


Try this:

=LOOKUP(10000,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&
"0123456789")),ROW(INDIRECT("1:4"))))

If any numbers have leading 0s they'll get dropped.

--
Biff
Microsoft Excel MVP


"Eric" wrote in message
...
Does anyone have any suggestions on how to retrieve the number from
filename?

Let assume that only 1 number existed within each filename, which
could
be
any number from 0 to 1000, such as "Eric - UP 4 R.xls". I would like
to
remove all characters of the filename except the number, and return
this
number into cell A2.

Does anyone have any suggestions?
Thank anyone for any suggestions
Eric






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How to retrieve the number?

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Eric" wrote in message
...
Thank you very much for your suggestions
There is no written filename in cell A1, do you have any suggestions on
how
to retrieve the filename for this worksheet and combine it with your
coding?
Thank you very much for any suggestions
Eric

"T. Valko" wrote:

Let assume that only 1 number existed within each filename, which could
be
any number from 0 to 1000


Try this:

=LOOKUP(10000,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&
"0123456789")),ROW(INDIRECT("1:4"))))

If any numbers have leading 0s they'll get dropped.

--
Biff
Microsoft Excel MVP


"Eric" wrote in message
...
Does anyone have any suggestions on how to retrieve the number from
filename?

Let assume that only 1 number existed within each filename, which
could
be
any number from 0 to 1000, such as "Eric - UP 4 R.xls". I would like
to
remove all characters of the filename except the number, and return
this
number into cell A2.

Does anyone have any suggestions?
Thank anyone for any suggestions
Eric






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
How to retrieve number from filename? Eric Excel Discussion (Misc queries) 4 December 15th 07 12:48 PM
How do I retrieve a page number in Excel? rambo1989 Excel Worksheet Functions 1 December 6th 07 01:10 PM
Retrieve Row index number loren.pottinger Excel Discussion (Misc queries) 6 August 30th 06 08:07 PM
Retrieve multiple dates, from a week number? stonescar New Users to Excel 1 July 5th 06 05:05 PM
Retrieve a number value from a word the dude Excel Discussion (Misc queries) 5 May 18th 06 07:36 PM


All times are GMT +1. The time now is 03:25 AM.

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

About Us

"It's about Microsoft Excel"