Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
W M
 
Posts: n/a
Default Return a digit in a string of numbers

Windows XP
Office XP

I would like to know if there is a formula which will return a specified digit in a string of digits. For example, assuming I have a number 5891034 in cell A1, then I want to place a formulas into cell A2-A8 that will separate each digit from that number into cells so that cell A2 would return the first digit "5", cell A3 returns the second digit "8", cell A4 returns the third digit "9", cell A5 returns the fourth digit "1", etc.

Is this possible?

Thanks in advance for any help you can provide.
  #2   Report Post  
 
Posts: n/a
Default

Hi WM,

If your value 5891034 is in cell A1 use this formula:
=MID($A$1,ROW()-1,1)
Should the value be in an alternative cell modify the formula
accordingly, remembering that it requires an absolute cell reference
($s).

Cheers,
JF

  #3   Report Post  
W M
 
Posts: n/a
Default

May you be richly blessed by the deity of your choice!
wrote in message ups.com...
Hi WM,

If your value 5891034 is in cell A1 use this formula:
=MID($A$1,ROW()-1,1)
Should the value be in an alternative cell modify the formula
accordingly, remembering that it requires an absolute cell reference
($s).

Cheers,
JF

  #4   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

You could just use Data | text to columns ... | Fixed length (1 character)

Alternatively you could use MID to extract characters

=MID(A1,1,1), =MID(A1,2,1), etc

Regards

Trevor


"W M" wrote in message ...
Windows XP
Office XP

I would like to know if there is a formula which will return a specified digit in a string of digits. For example, assuming I have a number 5891034 in cell A1, then I want to place a formulas into cell A2-A8 that will separate each digit from that number into cells so that cell A2 would return the first digit "5", cell A3 returns the second digit "8", cell A4 returns the third digit "9", cell A5 returns the fourth digit "1", etc.

Is this possible?

Thanks in advance for any help you can provide.
  #5   Report Post  
W M
 
Posts: n/a
Default

Thank you, I ended up using the Mid formula. I knew I had seen it somewhere in the formula listing before, but as you know, the older you get, the fewer powers of recall you have, it seems. Thank you so much for taking time to respond.
"Trevor Shuttleworth" wrote in message ...
You could just use Data | text to columns ... | Fixed length (1 character)

Alternatively you could use MID to extract characters

=MID(A1,1,1), =MID(A1,2,1), etc

Regards

Trevor


"W M" wrote in message ...
Windows XP
Office XP

I would like to know if there is a formula which will return a specified digit in a string of digits. For example, assuming I have a number 5891034 in cell A1, then I want to place a formulas into cell A2-A8 that will separate each digit from that number into cells so that cell A2 would return the first digit "5", cell A3 returns the second digit "8", cell A4 returns the third digit "9", cell A5 returns the fourth digit "1", etc.

Is this possible?

Thanks in advance for any help you can provide.


  #6   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

Thanks for the feedback. Glad you got a helpful response or two. Must admit I'd not taken into account that you were putting the data in rows rather than columns. Another sign of old age ! ExcelMunkey's suggestion is less labour intensive as you only need to enter the formula once and the drag down ... also more scaleable should the number be longer.

Regards

Trevor

"W M" wrote in message ...
Thank you, I ended up using the Mid formula. I knew I had seen it somewhere in the formula listing before, but as you know, the older you get, the fewer powers of recall you have, it seems. Thank you so much for taking time to respond.
"Trevor Shuttleworth" wrote in message ...
You could just use Data | text to columns ... | Fixed length (1 character)

Alternatively you could use MID to extract characters

=MID(A1,1,1), =MID(A1,2,1), etc

Regards

Trevor


"W M" wrote in message ...
Windows XP
Office XP

I would like to know if there is a formula which will return a specified digit in a string of digits. For example, assuming I have a number 5891034 in cell A1, then I want to place a formulas into cell A2-A8 that will separate each digit from that number into cells so that cell A2 would return the first digit "5", cell A3 returns the second digit "8", cell A4 returns the third digit "9", cell A5 returns the fourth digit "1", etc.

Is this possible?

Thanks in advance for any help you can provide.
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
Match Last Occurrence of two numbers and Return Date Sam via OfficeKB.com Excel Worksheet Functions 6 April 5th 05 12:40 PM
How do you display 16 digit numbers in excel ? (it keeps convert. CiaraF Excel Discussion (Misc queries) 3 March 30th 05 06:38 PM
I wish to change the last digit in a list of random numbers. To a. kingie Excel Worksheet Functions 5 February 28th 05 08:17 PM
16 DIGIT NUMBERS IN CELL WITHOUT LAST DIGIT BEING A ZERO jnkell Excel Worksheet Functions 2 December 18th 04 07:13 PM
How do you extract numbers from a string of chacters in a cell (E. blackbeemer Excel Worksheet Functions 6 November 12th 04 09:00 AM


All times are GMT +1. The time now is 10:02 PM.

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

About Us

"It's about Microsoft Excel"