Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Methods for making numbers into text are not the same

Entering a number into a cell that is formatted as "general", and then
changing the format to "text" is not the same as formatting a blank cell as
"text" and then entering a number. In the former, it is considered text, but
in the later method it is deemed a number but in text format. Also, in the
former case, entering a new number into the cell will change it to being a
number in text format.

The problem comes in doing a "match" function. The the lookup array needs
to have been formatted using the same method as the lookup value in order for
there to be a match.

Example:
I have a list of tasks that are numbered like:
4.8
4.9
4.10
4.11
These need to be a text format so that the subsection numbers are displayed
correctly.
The lookup value is a reference to a cell that has been formatted as text.
I.e. MATCH(B12, A1:A4)
If cell B12 was not formatted in the same manner as its corresponding value
in column A, then there is no match.

Any suggestions? (I will need to change values often, and I don't want to go
to a "4.07" style listing.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Methods for making numbers into text are not the same

If A1:A4 are all text values and B12 is a number or text:

=MATCH(B12&"", A1:A4, 0)
(0 means an exact match)

If A1:A4 are all numbers and B12 may be a number or text:
=MATCH(--B12, A1:A4, 0)

If A1:A4 can be a mixture of text and numbers and B12 can be either a number or
text:

The values have to look like numbers:
=match(--b12, --(a1:a4),0)
or
The values can contain strings that don't look like numbers:
=match(b12&"", a1:a4&"",0)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)




Tuck D. wrote:

Entering a number into a cell that is formatted as "general", and then
changing the format to "text" is not the same as formatting a blank cell as
"text" and then entering a number. In the former, it is considered text, but
in the later method it is deemed a number but in text format. Also, in the
former case, entering a new number into the cell will change it to being a
number in text format.

The problem comes in doing a "match" function. The the lookup array needs
to have been formatted using the same method as the lookup value in order for
there to be a match.

Example:
I have a list of tasks that are numbered like:
4.8
4.9
4.10
4.11
These need to be a text format so that the subsection numbers are displayed
correctly.
The lookup value is a reference to a cell that has been formatted as text.
I.e. MATCH(B12, A1:A4)
If cell B12 was not formatted in the same manner as its corresponding value
in column A, then there is no match.

Any suggestions? (I will need to change values often, and I don't want to go
to a "4.07" style listing.


--

Dave Peterson
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
Leveling Methods build Excel Worksheet Functions 3 October 13th 07 12:44 AM
Making Text into Numbers, for Pivot Table Cubes traceye Excel Worksheet Functions 0 January 31st 07 11:04 AM
Making calendar with numbers and text in same cell yankeybeans Excel Discussion (Misc queries) 0 October 13th 05 07:25 PM
Std.Dev.methods NOT WORKING SixSpeedShifter Charts and Charting in Excel 1 July 20th 05 06:32 PM
making a list of numbers. toddb123 Excel Discussion (Misc queries) 3 April 21st 05 12:21 PM


All times are GMT +1. The time now is 07:30 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"