#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default counting records

wrote in message
ups.com...
so it kinda didn't work ..
please check my excel file to see what i am trying to do ... i would be
very thankfull for any help

http://www.fuchka.info/tmp/example.xls

One of the problems is that you are using a format in stead of a number
something like custom 0######### on some numbers and 00######## on others.
So there is a problem in that when using LEN, LEFT, RIGHT etc... they work
on actual characters not format. Then I would use Bob Philips functions
which are perfect. This is the result I get when I use numbers instead of
format.

7 Numbers that start with a 1
3 Number of record starting with two digits, and first one is 1, and rest
are zero
3 Number of record starting with two digits, and first one is 2, and rest
are zero
1 Number of record starting with three digits, and first one is 1, and rest
are zero
1 Number of record starting with three digits, and first one is 2, and rest
are zero
1 Number of record starting with three digits, and first one is 3, and rest
are zero
1 Number of record starting with three digits, and first one is 4, and rest
are zero

=SUMPRODUCT(--(LEFT(O1:O24,1)="1"))
=SUMPRODUCT(--(LEFT(O1:O24,1)="1"),--(MID(O1:O24,2,1)<"0"),--(RIGHT(O1:O24,LEN(O1:O24)-2)=REPT("0",LEN(O1:O24)-2)))
=SUMPRODUCT(--(LEFT(O1:O17,1)="2"),--(MID(O1:O17,2,1)<"0"),--(RIGHT(O1:O17,LEN(O1:O17)-2)=REPT("0",LEN(O1:O17)-2)))
=SUMPRODUCT(--(LEFT(O1:O24,1)="1"),--(MID(O1:O24,2,1)<"0"),--(MID(O1:O24,3,1)<"0"),--(RIGHT(O1:O24,LEN(O1:O24)-3)=REPT("0",LEN(O1:O24)-3)))
=SUMPRODUCT(--(LEFT(O1:O24,1)="2"),--(MID(O1:O24,2,1)<"0"),--(MID(O1:O24,3,1)<"0"),--(RIGHT(O1:O24,LEN(O1:O24)-3)=REPT("0",LEN(O1:O24)-3)))
=SUMPRODUCT(--(LEFT(O1:O24,1)="3"),--(MID(O1:O24,2,1)<"0"),--(MID(O1:O24,3,1)<"0"),--(RIGHT(O1:O24,LEN(O1:O24)-3)=REPT("0",LEN(O1:O24)-3)))
=SUMPRODUCT(--(LEFT(O1:O24,1)="4"),--(MID(O1:O24,2,1)<"0"),--(MID(O1:O24,3,1)<"0"),--(RIGHT(O1:O24,LEN(O1:O24)-3)=REPT("0",LEN(O1:O24)-3)))

And you can modify his formulas to go on and on:

Number of record starting with four digits, and first one is 1, and rest
are zero
Number of record starting with four digits, and first one is 2, and rest
are zero
Number of record starting with four digits, and first one is 3, and rest
are zero
Number of record starting with four digits, and first one is 4, and rest
are zero


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
Counting unique records yhtak Excel Worksheet Functions 6 June 16th 06 02:34 PM
Counting records within a month JoAnn New Users to Excel 1 November 22nd 05 06:15 PM
Counting unique records with additional criteria [email protected] Excel Worksheet Functions 4 September 27th 05 06:53 PM
Deleting specific records [email protected] Excel Discussion (Misc queries) 6 June 22nd 05 11:35 PM
Counting Unique Records with multiple conditions Keithlearn Excel Worksheet Functions 4 April 27th 05 12:44 AM


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