Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a column in which rows will contain the value of "1" when that row
meets a certain criteria. I want to build an ascending list in another location of the row numbers in that column that contain "1". Any ideas? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assume that col is col B, which would contain only 1's or blanks in B2 down
In C2: =IF(B2=1,ROW(),"") Leave C1 blank In D2: =IF(ROWS($1:1)COUNT(C:C),"",SMALL(C:C,ROWS($1:1)) ) Select C2:D2, copy down to cover the max expected extent in col B. Hide away col C. Col D returns what you seek, all neatly bunched at the top. Adapt to suit. -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Mitch Powell" wrote: I have a column in which rows will contain the value of "1" when that row meets a certain criteria. I want to build an ascending list in another location of the row numbers in that column that contain "1". Any ideas? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Outstanding! Thank you very much.
"Max" wrote: Assume that col is col B, which would contain only 1's or blanks in B2 down In C2: =IF(B2=1,ROW(),"") Leave C1 blank In D2: =IF(ROWS($1:1)COUNT(C:C),"",SMALL(C:C,ROWS($1:1)) ) Select C2:D2, copy down to cover the max expected extent in col B. Hide away col C. Col D returns what you seek, all neatly bunched at the top. Adapt to suit. -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Mitch Powell" wrote: I have a column in which rows will contain the value of "1" when that row meets a certain criteria. I want to build an ascending list in another location of the row numbers in that column that contain "1". Any ideas? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
welcome, Mitch.
-- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Mitch Powell" wrote in message ... Outstanding! Thank you very much. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
Another approach: Enter into E2: =MATCH(1,B2:$B$65536,)+1 Enter into E3: =MATCH(1,INDEX(B:B,E2+1):$B$65536,)+E2 Copy down until you see error values... Calculation times for 2000 rows with 115 "one"s: 0.65 millisecs [Max': 48.77 millisecs where column D took 45.48ms] Regards, Bernd |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=SMALL(IF(data=1,ROW(INDIRECT("1:"&ROWS(data)))),R OWS($1:1))
ctrl+shift+enter, not just enter copy down "Mitch Powell" wrote: I have a column in which rows will contain the value of "1" when that row meets a certain criteria. I want to build an ascending list in another location of the row numbers in that column that contain "1". Any ideas? |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello Teethless Mama,
Your calculation time for 2000 rows with 115 "one"s: 100.03 millisecs [FastExcel] Regards, Bernd |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Interesting timings there, Bernd ! Thanks.
Wonder how these comparative timings would look like if we were to say cover 20000 rows instead, and with error trapping* included for your/TM's suggestions? *see below. Copy down until you see error values... Ahh, but my suggestion also eliminates all those nasty error values, giving neat outputs for the OP <g -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Bernd P" wrote in message oups.com... Hello, Another approach: Enter into E2: =MATCH(1,B2:$B$65536,)+1 Enter into E3: =MATCH(1,INDEX(B:B,E2+1):$B$65536,)+E2 Copy down until you see error values... Calculation times for 2000 rows with 115 "one"s: 0.65 millisecs [Max': 48.77 millisecs where column D took 45.48ms] Regards, Bernd |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Wonder how these comparative timings would look like if we were to say
cover 20000 rows instead, and with error trapping* included for your/TM's suggestions? Try it. There's calc timer code he http://msdn2.microsoft.com/en-us/library/aa730921.aspx -- Biff Microsoft Excel MVP "Max" wrote in message ... Interesting timings there, Bernd ! Thanks. Wonder how these comparative timings would look like if we were to say cover 20000 rows instead, and with error trapping* included for your/TM's suggestions? *see below. Copy down until you see error values... Ahh, but my suggestion also eliminates all those nasty error values, giving neat outputs for the OP <g -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Bernd P" wrote in message oups.com... Hello, Another approach: Enter into E2: =MATCH(1,B2:$B$65536,)+1 Enter into E3: =MATCH(1,INDEX(B:B,E2+1):$B$65536,)+E2 Copy down until you see error values... Calculation times for 2000 rows with 115 "one"s: 0.65 millisecs [Max': 48.77 millisecs where column D took 45.48ms] Regards, Bernd |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello Max,
For 20,000 rows with about 1,600 "one"s I got [FastExcel]: You: about 6,000 msec Teethless Mama without cleansing: 10,000 msec Myself with cleansing: about 15 msec (almost no diff to the original without cleansing) Regards, Bernd |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Bernd,
Thanks for the test and results ! You win hands down <g -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#13
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Biff,
Good reference, thanks. And it is exactly that guy who offers FastExcel. IMHO anyone who uses Excel seriously should have it and use it. Who would drive a car without a speedometer? Regards, Bernd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dropdown List - list item endings not visible if column too narrow | Excel Discussion (Misc queries) | |||
validation list--list depends on the selection of first list | New Users to Excel | |||
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 | Excel Worksheet Functions | |||
find names on list 1 in list 2. list 1 4000 names list 2 400 name | Excel Worksheet Functions | |||
sort list of players by team from player list on separate sheet | Excel Worksheet Functions |