Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Formulas > Useful Formulas< Previous | Next > 

 

Please contact us if you have any useful formulas we can add to this page.

 
 

To make a contribution to this website please e-mail us. feedback3@bettersolutions.com

 

 

1) Insert random numbers between 1 and 25

 
 
 AB
1156
 
 

=INT(RAND()*25)+1=15

 
 

=INT(RAND()*25)+1=6

 

 

2) Rounding numbers to the nearest fraction

 
 
 AB
112.4854.26
212.374.2
312.29123.456
 
 

=ROUND(A1/0.2,0)*0.2=12.4 (rounded down)

 
 

=ROUND(A2/0.2,0)*0.2=12.4 (rounded up)

 
 

=ROUND(A3/0.2,0)*0.2=12.2 (rounded down)

 
 

=ROUND(B1/0.5,0)*0.5=4.5 (rounded up)

 
 

=ROUND(B2/50,0)*50=50 (rounded down)

 
 

=ROUND(B3/25,0)*25=125 (rounded up)

 

 

3) Obtaining just the workbook name from a folder path and workbook name

 
 
 A
1Book1.xls
2C:\Temp\BetterSolutions.xls
3C:\Temp\SubFolder\Another Folder\Workbook_Name.xls
 
 

=MID(A1,FIND("#",SUBSTITUTE("\"&A1,"\","#",LEN(A1)-LEN(SUBSTITUTE(A1,"\",""))+1)),LEN(A1))="Book1.xls"

 
 

=MID(A2,FIND("#",SUBSTITUTE("\"&A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))+1)),LEN(A2))="BetterSolutions.xls"

 
 

=MID(A3,FIND("#",SUBSTITUTE("\"&A3,"\","#",LEN(A3)-LEN(SUBSTITUTE(A3,"\",""))+1)),LEN(A3))="Workbook_Name.xls"

 

 Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >