Jan 2007 Challenge of the Month Discussion

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
My Take on This

IF(LEFT(A2,1)=LEFT(G2,1),RIGHT(A2,1),"")&IF(LEFT(B2,1)=LEFT(G2,1),RIGHT(B2,1),"")&IF(LEFT(C2,1)=LEFT(G2,1),RIGHT(C2,1),"")&IF(LEFT(D2,1)=LEFT(G2,1),RIGHT(D2,1),"")&IF(LEFT(E2,1)=LEFT(G2,1),RIGHT(E2,1),"")
 
This works for descending order with the data in column A

D2: {=SUM((A$2:A$26-C2*10)*IF(LEFT(A$2:A$26,1)=""&C2,""&10^(ROW(A$2:A$26)-MATCH(MAX(IF(LEFT(A$2:A$26,1)=""&C2,A$2:A$26,"")),A$1:A$26,FALSE)),"0"))}
 
cmvpjones3-stemdata.JPG


Leaves
B2=A2-Rounddown(A2,-1)

Number of Leaves
C2=COUNTIF($A$2:$A$26,"<40")-SUM(C$1:C1)
 
Hi,

Step 1: Set BIN
Step 2: {+Rept("*",FREQUENCY(A2:E6,G2:G6)}
Step 3: Enjoy your Stem & Leaf Plot

slrk7.png


Regards,
 
am i too late joint this challenge? :roll:
this is simplify Jonathan garcia which no need Bin helper cell and only show the chart

=REPT("$",FREQUENCY(A2:A26,VALUE(C2:C6&9)))


this one showing the numbers

=SMALL(IF(VALUE(LEFT($A$2:$A$26))=C2,VALUE(RIGHT($A$2:$A$26))),COLUMN($1:$25))

check this on file
Code:
http://rapidshare.com/files/14623180/jan2007cl_3KB.rar.html
 
Elegant Formula for stem and leaf

edited sorry for double post

Hady
 
Elegant Formula for stem and leaf

I have an elegant way to create stem and leaf chart without any helper cells and no VBA , no UDF or no excel add in just common/native formula in excel. :)

Assume the data on cell A2:A26,

put formula on C2
Code:
=MIN(IF(INT($A$2:$A$26/10)>C1,INT($A$2:$A$26/10)))
execute as CSE

put formula on D2
Code:
=TEXT(SUM(IF(ISERROR(LARGE(IF(VALUE(LEFT($A$2:$A$26))=C2,VALUE(RIGHT($A$2:$A$26))),COLUMN($1:$25))),0,LARGE(IF(VALUE(LEFT($A$2:$A$26))=C2,VALUE(RIGHT($A$2:$A$26))),COLUMN($1:$25)))*10^(COLUMN($1:$25)-1)),REPT(0,INDEX(FREQUENCY($A$2:$A$26,VALUE($C$2:$C$6&9)),ROW()-1)))
execute as CSE

select C2:D2
drag down as required
you got stem and leaf diagram in elegant way

check this out on my excel sheet on below link
http://rapidshare.com/files/14791662/MrExcel_January_07_challenge.rar.html

regards,
Hady
XL-Mania

[Edited to make link clickable~admin]
 

Forum statistics

Threads
1,222,716
Messages
6,167,823
Members
452,146
Latest member
Baldred

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top