Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Convert Number to Text for Index/Match

I have a column of data and it is a 4 character string, with all characters being numbers. The data ranges from 0004 to 8862. My data in the match column is a mix of text (the values with their leading zeros retained) and numbers - which is some of the rest of the numbers. The problem is that I cannot get all of the data in the column to be read as text; for example, 1000-2500 are numbers, but starting at 2502, they are text.

When doing an index/match, Excel treats 2210 the text value different from 2210 the number. How do I get them sync'd up so that my index/match works?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default Convert Number to Text for Index/Match

hi,

i supposed that the data is placed in range A1:B5 and the value to
search in range F1
this is an array formula, you must validate with "ctrl + shift + enter"

=IF(ISERROR(MATCH(F1,$A$1:$A$5,0)),INDEX($B$1:$B$5 ,MATCH(F1,($A$1:$A$5)*1,0)),INDEX($B$1:$B$5,MATCH( F1,$A$1:$A$5,0)))

--
isabelle


Le 2012-10-31 15:52, a écrit :
I have a column of data and it is a 4 character string, with all characters being numbers. The data ranges from 0004 to 8862.
My data in the match column is a mix of text (the values with their leading zeros retained) and numbers - which is some of the rest of the numbers.
The problem is that I cannot get all of the data in the column to be read as text; for example, 1000-2500 are numbers, but starting at 2502, they are text.

When doing an index/match, Excel treats 2210 the text value different from 2210 the number. How do I get them sync'd up so that my index/match works?


  #3   Report Post  
Member
 
Location: Bangalore
Posts: 41
Thumbs up

Hi,

In your existing formula just put two dashes (--) before the lookup value. So if your formula is in cell B1 and the lookup value is in A1. Instead of doing match(A1,Data Range,0) do match(--(A1), Data Range,0).

This operator will convert any text (which looks like number) into a number.

Thanks,
Prashant
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
Index Match to add employee number Diddy Excel Worksheet Functions 2 September 29th 09 03:32 PM
Number of characters in a cell for a Index/match function Govind Excel Worksheet Functions 11 May 6th 09 08:37 AM
index / lookup / match / text formula JB2010 Excel Discussion (Misc queries) 4 March 28th 07 03:01 AM
LOOKUP OR INDEX/MATCH TO FIND NUMBER? A.S. Excel Discussion (Misc queries) 3 February 5th 07 10:29 PM
Keep text color from a Index Match Formula Woody Excel Programming 4 July 21st 05 05:43 PM


All times are GMT +1. The time now is 07:26 AM.

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"