Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Array formula to Identify Leading Zeros.

I have a bunch of spreadsheets that have a sizable number of columns -
usually about 128 columns. And I need to identify those columns that
have leading zeros in them. Logically, If I knew how many cells had a
zero in the left most position, I could tell which column had a
leading zero. But with 128 columns and 500-12000 rows, this is too
hard to just eyeball.

I think an array formula will do the trick - but I'm not having much
luck getting one to work. For example, in column B, cells B7:B478,
I've tried something like:
{=sum(countif(B7:B478,left(B7:B478,1)=0))}

Am I in the ballpark here?
  #2   Report Post  
Posted to microsoft.public.excel.misc
CM CM is offline
external usenet poster
 
Posts: 136
Default Array formula to Identify Leading Zeros.

this worked for me -- data formatted as text in c1:I10:

=COUNTIF(C1:I10,"=0*")
--
hope to help,
cm


"Commish" wrote:

I have a bunch of spreadsheets that have a sizable number of columns -
usually about 128 columns. And I need to identify those columns that
have leading zeros in them. Logically, If I knew how many cells had a
zero in the left most position, I could tell which column had a
leading zero. But with 128 columns and 500-12000 rows, this is too
hard to just eyeball.

I think an array formula will do the trick - but I'm not having much
luck getting one to work. For example, in column B, cells B7:B478,
I've tried something like:
{=sum(countif(B7:B478,left(B7:B478,1)=0))}

Am I in the ballpark here?
.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Array formula to Identify Leading Zeros.

That is a nice small formula and it works like a charm.

Thanks.


On Dec 21, 5:37*pm, cm wrote:
this worked for me -- data formatted as text in c1:I10:

=COUNTIF(C1:I10,"=0*")
--
hope to help,
cm

"Commish" wrote:
I have a bunch of spreadsheets that have a sizable number of columns -
usually about 128 columns. And I need to identify those columns that
have leading zeros in them. Logically, If I knew how many cells had a
zero in the left most position, I could tell which column had a
leading zero. But with 128 columns and 500-12000 rows, this is too
hard to just eyeball.


I think an array formula will do the trick - but I'm not having much
luck getting one to work. For example, in column B, cells B7:B478,
I've tried something like:
* * * {=sum(countif(B7:B478,left(B7:B478,1)=0))}


Am I in the ballpark here?
.


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
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
leading zeros are not showing in the formula bar but do show in ce Debbie Excel Discussion (Misc queries) 2 October 2nd 05 03:26 PM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM


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