Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Formula Dropping Leading Zeros

I am currently utilizing the following formula:

=LOOKUP(A7,{'0055622,'0055625}),{"This worked 1","This worked 2"})

However, when I put it into Excel, it is dropping the leading zeros on my
test numbers. It looks like the following:

=LOOKUP(A7,{'55622,'55625}),{"Obsolete Test","New Version of This Test
Exists"})

I really need this formula to retain the zeros. Any ideas on how I would do
this?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula Dropping Leading Zeros

=LOOKUP(A7,{"0055622","0055625"}),{"This worked 1","This worked 2"})


--
Regards,
Tom Ogilvy

"Computer Lady" wrote in message
. ..
I am currently utilizing the following formula:

=LOOKUP(A7,{'0055622,'0055625}),{"This worked 1","This worked 2"})

However, when I put it into Excel, it is dropping the leading zeros on my
test numbers. It looks like the following:

=LOOKUP(A7,{'55622,'55625}),{"Obsolete Test","New Version of This Test
Exists"})

I really need this formula to retain the zeros. Any ideas on how I would

do
this?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Formula Dropping Leading Zeros

On Thu, 26 Jan 2006 14:13:32 -0600, "Computer
wrote:

I am currently utilizing the following formula:

=LOOKUP(A7,{'0055622,'0055625}),{"This worked 1","This worked 2"})

However, when I put it into Excel, it is dropping the leading zeros on my
test numbers. It looks like the following:

=LOOKUP(A7,{'55622,'55625}),{"Obsolete Test","New Version of This Test
Exists"})

I really need this formula to retain the zeros. Any ideas on how I would do
this?

Thanks!


That's really odd as I cannot enter a formula at all with anything like your
first array (leading single quote followed by numbers).

So my advice may be useless since I can't duplicate your problem. But you
could enclose the numbers in your first array within double quotes:

=LOOKUP(A7,{"0055622","0055625"}),{"This worked 1","This worked 2"})

Or, if this is referencing a table where the lookup values are text (so they
have a leading single quote), you could make that numeric and also, for
appearance, apply a custom format: Format/Cells/Number/Custom type: 0000000


--ron
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula Dropping Leading Zeros


=LOOKUP(A7,{"0055622","0055625"},{"This worked 1","This worked 2"})


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=505491

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
add leading zeros within a formula LG[_2_] Excel Worksheet Functions 2 August 21st 09 08:11 PM
How do I stop Excel from dropping leading zeros? Carl Nash Excel Discussion (Misc queries) 9 April 22nd 09 08:11 PM
Ignore leading zeros in a formula cell TravEyE Excel Discussion (Misc queries) 2 January 25th 08 07:57 PM
LEADING ZEROS IN FORMULA RESULT Advent Excel Worksheet Functions 4 December 8th 06 01:22 PM
Dropping leading zeros in character fields. Ron K Excel Programming 2 September 11th 03 07:41 AM


All times are GMT +1. The time now is 11:50 PM.

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"