Example Workbook ASAP Utilities Formulas
Example Workbook ASAP Utilities Formulas
To use these worksheet functions you need to have ASAP Utilities installed.
Click on the function to view an example of its use:
1 =ASAPCELLCOLORINDEX() 18 =ASAPGETFORMULA()
2 =ASAPCOUNTBYCELLCOLOR() 19 =ASAPGETFORMULAINT()
3 =ASAPCOUNTBYFONTCOLOR() 20 =ASAPGETHYPERLINK()
4 =ASAPCOUNTCHAR() 21 =ASAPGETNUMBERFORMAT()
5 =ASAPCOUNTSHADES() 22 =ASAPISBOLD()
6 =ASAPEXTRACTFILENAME() 23 =ASAPISFORMULA()
7 =ASAPEXTRACTFOLDERNAME() 24 =ASAPLOADIMAGE()
8 =ASAPEXTRACTNUMBERS() 25 =ASAPMERGECELLS()
9 =ASAPFILENAME() 26 =ASAPRANDOMPASSWORD()
10 =ASAPFILEPATH() 27 =ASAPSHEETNAME()
11 =ASAPFILEPROPERTIES 28 =ASAPSPELLNUMBER()
12 =ASAPFONTCOLORINDEX() 29 =ASAPSTRIPNUMBERS()
13 =ASAPFULLFILENAME() 30 =ASAPSUMBYCELLCOLOR()
14 =ASAPGETCOMMENT() 31 =ASAPSUMBYFONTCOLOR()
15 =ASAPGETDOMAIN() Note Remarks on calculation and distribution
16 =ASAPGETFONTNAME()
17 =ASAPGETFONTSIZE()
The macro in this workbook automatically updates the references from the ASAP Utilities formulas
to the program folder if needed. This can for example be the case if ASAP Utilities is not installed
in the default C:\Program Files\ASAP Utilities\ folder but for example
C:\Program Files (x86)\ASAP Utilities\
If the macro does not run automatically then you can press the button below:
�
http://www.asap-utilities.com
««« back #ADDIN?
###
Cell color
Color index number: Formula used in column B:
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
««« back #ADDIN?
###
You can use this function to count the number of cells that have a certain color.
The first parameter is the range to be searched, the second parameter is either the cell that has the color (rec
Example 1
Use the =ASAPCOUNTBYCELLCOLOR() formula to count the number of yellow cells:
We use B10 in the formula to have the formula count the cells with the same cell color as cell B10
Result: Formula used in B10:
Err:511 Err:511
34 81 75 11 103 88 12 105 20 83
18 73 64 56 41 101 84 28 77 21
92 27 91 58 36 54 45 24 66 68
102 30 15 19 97 71 17 70 33 10
63 40 61 32 8 51 44 67 35 38
55 13 72 4 69 79 3 42 99 9
Example 2
Use the =ASAPCOUNTBYCELLCOLOR() formula to count the number of green cells:
The colorindex number for the green color is 4
Result: Formula used in B23:
Err:511 Err:511
###
You can use this function to count the number of cells that have a certain font color.
The first parameter is the range to be searched, the second parameter is either the cell that has the fontcolor
Example 1
Count the number of cells with a blue font:
We use B10 as a reference in the formula to have the formula count the cells with the same cell color as cell
Result: Formula used in B10:
Err:511 Err:511
34 81 75 11 103 88 12 105 20 83
18 73 64 56 41 101 84 28 77 21
92 27 91 58 36 54 45 24 66 68
102 30 15 19 97 71 17 70 33 10
63 40 61 32 8 51 44 67 35 38
55 13 72 4 69 79 3 42 99 9
Example 2
Count the number of cells with a red font:
The colorindex number for the red color = 3
Result: Formula used in B23:
Err:511 Err:511
#ADDIN?
Text How many spaces? Formula used in column C:
Test Err:511 Err:511
Bastien Mensink Err:511 Err:511
blah blah blah Err:511 Err:511
Microsoft Excel 2010 Err:511 Err:511
15 Err:511 Err:511
You can also use it to count words by counting all the spaces and add 1:
Use it to count words How many words? Formula used in column C:
how many words are this? Err:511 Err:511
and this? Err:511 Err:511
now Err:511 Err:511
Same technique, but with a workaround if there are double spaces between the cells
Use it to count words How many words? Formula used in column C:
how many words are this? Err:511 Err:511
and this? Err:511 Err:511
now Err:511 Err:511
How to do this without the use of ASAP Utilities:
0 Err:511
1 Err:511
2 Err:511
2 Err:511
0 Err:511
Err:511 2 Err:511
5 Err:511
2 Err:511
1 Err:511
5 Err:511
2 Err:511
1 Err:511
e use of ASAP Utilities:
««« back #ADDIN?
###
You can use this function to count the number of colored cells (so called "shades").
Example
Use the =ASAPCOUNTSHADES() formula to count the number colored cells.
Result: Formula used in B6:
Err:511 Err:511
34 81 75 11 103 88 12 105 20 83
18 73 64 56 41 101 84 28 77 21
92 27 91 58 36 54 45 24 66 68
102 30 15 19 97 71 17 70 33 10
63 40 61 32 8 51 44 67 35 38
52 3 53 72 90 111 161 101 6 141
1 52 261 9 84 1 35 18 74 0
31 148 128 3 2 244 13 112 51 196
72 22 262 136 26 44 0 22 2 17
51 28 75 220 84 44 119 36 157 114
««« back #ADDIN?
#ADDIN?
Returns the file name from a full path and filename.
Example
Full path and filename Result:
D:\Projects\Archive\Client 1\Balance.xls Err:511
\\FS\Projects\Archive\Client 1\Balance.xls Err:511
D:\Projects\Client 14\Sales.xlsx Err:511
D:\Projects\Client 14\Prices to be updates.xlsm Err:511
Formula used in column C
Err:511
Err:511
Err:511
Err:511
««« back #ADDIN?
#ADDIN?
Returns the folder name from a combined filepath and filename.
Example
Full path and filename Result:
D:\Projects\Archive\Client 1\Balance.xls Err:511
\\FS\Projects\Archive\Client 1\Balance.xls Err:511
D:\Projects\Client 14\Sales.xlsx Err:511
D:\Projects\Client 14\Prices to be updates.xlsm Err:511
Formula used in column C
Err:511
Err:511
Err:511
Err:511
««« back #ADDIN?
#ADDIN?
Returns the numbers from a text string.
The result is a number. Therefore leading zeros are not preserved.
Example
Value Result:
8011 LB Err:511
ART.47654 Err:511
PROD0004431 Err:511
D232SE Err:511
BE-54 Err:511
978-90-274-3964-2. Err:511
NL.8173.03.954 Err:511
Year published: 1984 Err:511
ISO9001 Err:511
are not preserved.
#ADDIN?
Returns the name of your workbook. This is the name of the workbook without the filepath (folder).
Example
The name of this example workbook:
Result:
#ADDIN?
#ADDIN?
Returns the filepath (the folder) where your workbook is stored.
Example
The folder of this example workbook:
Result:
#ADDIN?
#ADDIN?
Returns the value of one of the built-in document properties for the current workbook.
You can refer to document properties either by index value or by their English name.
Example
Property
1 Title
2 Subject
3 Author
4 Keywords
5 Comments
7 Last Author
9 Application Name
10 Last Print Date
11 Creation Date
12 Last Save Time
18 Category
20 Manager
21 Company
29 Hyperlink Base
lue of one of the built-in document properties for the current workbook.
o document properties either by index value or by their English name.
#ADDIN?
Text colored Font color index number: Formula used in column C:
Blue Err:511 Err:511
Red Err:511 Err:511
Dark grey Err:511 Err:511
Green Err:511 Err:511
Orange Err:511 Err:511
Lighter grey Err:511 Err:511
Amsterdam Err:511 Err:511
Athens Err:511 Err:511
Berlin Err:511 Err:511
Bern Err:511 Err:511
Brussels Err:511 Err:511
Budapest Err:511 Err:511
Copenhagen Err:511 Err:511
Dublin Err:511 Err:511
Helsinki Err:511 Err:511
London Err:511 Err:511
Luxembourg Err:511 Err:511
Madrid Err:511 Err:511
Moscow Err:511 Err:511
Oslo Err:511 Err:511
Paris Err:511 Err:511
Prague Err:511 Err:511
Reykjavík Err:511 Err:511
Rome Err:511 Err:511
Stockholm Err:511 Err:511
Vienna Err:511 Err:511
««« back
#ADDIN?
#ADDIN?
Returns the full filename of your workbook. This is the name of the workbook including the folder (filepath) where it is save
Example
The folder of this example workbook:
Result:
#ADDIN?
#ADDIN?
Returns the comment-text from a cell.
Example
Cells with comment Comment contents:
Test Err:511
500 Err:511
19% Err:511
35 Err:511
Formula used in column D
Err:511
Err:511
Err:511
Err:511
««« back #ADDIN?
#ADDIN?
Returns the (sub)domain from a given hyperlink (website address/url).
This can be useful if you are for example analyzing website stats to quickly see which refers come from the s
#ADDIN?
Returns the name of the font in a cell.
Example
Value Result Formula used in column D
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
««« back #ADDIN?
#ADDIN?
Returns the name of the font in a cell.
You can also use this to sort by font-size.
Example
Value Result Formula used in column D
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
Test value Err:511 Err:511
###
Returns the formula of a cell.
This formula is used allover this workbook to show you which formulas are used
Example
Formula Result
144 Err:511
6 Err:511
150 Err:511
75 Err:511
2/Dec/19 Err:511
click Err:511
not so large Err:511
blah blah blah Err:511
125 Err:511
Formula used in column D
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
««« back #ADDIN?
###
Returns the formula of a cell in the "international" (English) notation.
The English names for the formulas will be used, the list separator is a comma and the decimal separator is a
The largest resources on the Internet on Excel are in English. On these websites the "international" formulas
Example
Formula Result
144 Err:511
923 Err:511
1067 Err:511
533.5 Err:511
2/Dec/19 Err:511
click Err:511
pretty large Err:511
blah blah blah Err:511
125 Err:511
omma and the decimal separator is a point.
websites the "international" formulas and style are used. If you use a local version of Excel you can now easily create an "international"
#ADDIN?
Returns the (sub)domain from a given hyperlink (website address/url).
This can be useful if you are for example analyzing website stats to quickly see which refers come from the s
Example
Value with hyperlink Get the used hyperlink:
click here Err:511
or click here Err:511
official excel blog Err:511
MS Excel on Twitter Err:511
ASAP Utilities on Twitter Err:511
#ADDIN?
Returns the number format of a cell.
Example
Value Result
1,250 Err:511
Test Err:511
Text Err:511
12/2/2019 Err:511
12/2/2019 3:37 Err:511
€ 5,000.00 Err:511
$5,000.00 Err:511
Err:511 Err:511
0012 Err:511
82% Err:511
250 Err:511
(250) Err:511
Formula used in column D
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
««« back #ADDIN?
#ADDIN?
Returns TRUE if the cell is bold or FALSE if it isn't.
Example
Value Result Formula used in column D
sort Err:511 Err:511
sort code Err:511 Err:511
php sort Err:511 Err:511
sort array Err:511 Err:511
bubble sort Err:511 Err:511
java sort Err:511 Err:511
sql sort Err:511 Err:511
sort by Err:511 Err:511
mysql sort Err:511 Err:511
javascript sort Err:511 Err:511
perl sort Err:511 Err:511
sort of Err:511 Err:511
php sort array Err:511 Err:511
sort by color Err:511 Err:511
bank sort code Err:511 Err:511
sort arraylist Err:511 Err:511
insertion sort Err:511 Err:511
selection sort Err:511 Err:511
list sort Err:511 Err:511
sort algorithm Err:511 Err:511
datagrid sort Err:511 Err:511
mysql sort by Err:511 Err:511
sql sort by Err:511 Err:511
merge sort Err:511 Err:511
c++ sort Err:511 Err:511
sort datatable Err:511 Err:511
quick sort Err:511 Err:511
vba sort Err:511 Err:511
sort on Err:511 Err:511
#ADDIN?
Returns TRUE if the cell has a formula or FALSE if it doesn't.
Example
Value or formula Result Formula used in column D
79% Err:511 Err:511
17% Err:511 Err:511
83% Err:511 Err:511
85% Err:511 Err:511
10% Err:511 Err:511
30% Err:511 Err:511
42% Err:511 Err:511
66% Err:511 Err:511
5% Err:511 Err:511
31% Err:511 Err:511
96% Err:511 Err:511
5% Err:511 Err:511
66% Err:511 Err:511
16% Err:511 Err:511
78% Err:511 Err:511
97% Err:511 Err:511
62% Err:511 Err:511
67% Err:511 Err:511
40% Err:511 Err:511
77% Err:511 Err:511
34% Err:511 Err:511
56% Err:511 Err:511
91% Err:511 Err:511
32% Err:511 Err:511
54% Err:511 Err:511
71% Err:511 Err:511
40% Err:511 Err:511
87% Err:511 Err:511
85% Err:511 Err:511
#ADDIN?
Inserts the specified image as an object and puts it at the left-top of your cell.
To update the image, you can replace the formula with a new image name.
To remove the image you have to remove both the formula and the image. (The image isn't removed if only th
You have to press Control+Alt+F9 to have the formula recalculated.
Example
Image path and file name or url
http://www.asap-utilities.com/press/box-shot-asap-utilities-left-angle-big.png
http://www.asap-utilities.com/press/logo-asap-utilities-small-200px.png
C:\Windows\Web\Wallpaper\Windows\img0.jpg
C:\WINDOWS\WEB\WALLPAPER\WINDOWS\IMG0.JPG
C:\Windows\Soap Bubbles.bmp
r cell.
me.
ge. (The image isn't removed if only the formula is removed.)
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
««« back #ADDIN?
#ADDIN?
Example 1
Values Result
1/80s Err:511
5.7f
ISO: 400 Formula used above
12.0mm Err:511
November 12, 2010
Example 2
Values Result
apple Err:511
pear
banana Formula used above
orange Err:511
Example 3
Payment is due: Result Formula used
November 11, 2010 Err:511 Err:511
November 18, 2010 Err:511 Err:511
November 25, 2010 Err:511 Err:511
December 2, 2010 Err:511 Err:511
Example 4
Values Result
BEAV Err:511
BESI
AATK Formula used above
BFAM Err:511
CCOMP
BNHN It would require a long formula without ASAP Utilities
ACLS BEAV, BESI, AATK, BFAM, CCOMP, BNHN, ACLS, BIOM, CCRD, BBBY, BF
BIOM
CCRD Formula used above
BBBY Err:511
BFEN
BBGI
CBUK
BIORY
BASI
BCIS
AALA
BFRE
BEIQ
BKNW
BRKC
BSXT
ACTT
ABIZ
CALD
BRKS
AFAM
ACME
CAFEW
ABAX
t of this ASAP Utilities function:
is to display only one decimal then this function uses value as "12.2".
Formula used
Err:511
Err:511
Err:511
Err:511
ut ASAP Utilities
NHN, ACLS, BIOM, CCRD, BBBY, BFEN, BBGI, CBUK, BIORY, BASI, BCIS, AALA, BFRE, BEIQ, BKNW, BRKC, BSXT, ACTT, ABIZ, CA
RKC, BSXT, ACTT, ABIZ, CALD, BRKS, AFAM, ACME, CAFEW, ABAX
««« back #ADDIN?
#ADDIN?
Returns a random string that can be used as a password.
The minimum lenght is 8, the maximum length is 32767…
Example 1
Password Length
#ADDIN? #ADDIN?
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
Err:511 Err:511
special characters
Formula used in column C
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
Err:511
««« back #ADDIN?
#ADDIN?
Returns the name of the worksheet this formula is used on.
We use this also to dynamically create the hyperlinks to the formulas on our website in the link on each works
For example in the link in cell B1 on the worksheet ASAPRANDOMPASSWORD we use the following formula
Err:511
which results in the following hyperlink address:
http://www.asap-utilities.com/asap-utilities-excel-tools-tip.php?tip=259&utilities=97#ASAPRANDOMPASSWO
Example
The name of this example workbook:
Result:
#ADDIN?
#ASAPRANDOMPASSWORD
««« back #ADDIN?
#ADDIN?
Returns a spelled-out number or amount in the languages English, Dutch or German
Example 1, no currency
Value Result
125.00 Err:511
89.99 Err:511
125.00 Err:511
89.99 Err:511
125.00 Err:511
89.99 Err:511
125.00 Err:511
89.99 Err:511
125.00 Err:511
89.99 Err:511
125.00 Err:511
89.99 Err:511
#ADDIN?
Removes all numbers from a text string and removes all spaces at the beginning and end of the result.
Example
Value Result:
8011 LB Err:511
ART.47654 Err:511
PROD0004431 Err:511
ZZE5 Err:511
ISO9001 Err:511
Capital Sheet Metal Inc 32020 Err:511
Capitol City 16361 Err:511
Carreker Corporation 015509 Err:511
all spaces at the beginning and end of the result.
###
Calculates the SUM of the cells that have a certain fill color.
Example 1
Use the ASAPSUMBYCELLCOLOR() formula to sum the values of the yellow cells:
We use B10 in the formula to have the formula count the cells with the same cell color as cell B10
Result: Formula used in B9:
Err:511 Err:511
34 81 75 11 103 88 12 105 20 83
18 73 64 56 41 101 84 28 77 21
92 27 91 58 36 54 45 24 66 68
102 30 15 19 97 71 17 70 33 10
63 40 61 32 8 51 44 67 35 38
55 13 72 4 69 79 3 42 99 9
Example 2
Use the =ASAPSUMBYCELLCOLOR() formula to sum the values of the green cells:
The colorindex number for the green color is 4
Result: Formula used in B22:
Err:511 Err:511
497 Err:511
And now image that the colors have changed and you need to update the formula with the method used abo
ula with the method used above…
««« back #ADDIN?
###
You can use this function to count the number of cells that have a certain font color.
The first parameter is the range to be searched, the second parameter is either the cell that has the fontcolor
Example 1
Use the =ASAPSUMBYFONTCOLOR() formula to SUM the values of cells with a blue font:
We use B10 in the formula to have the formula count the cells with the same cell color as cell B10
Result: Formula used in B10
Err:511 Err:511
34 81 75 11 103 88 12 105 20 83
18 73 64 56 41 101 84 28 77 21
92 27 91 58 36 54 45 24 66 68
102 30 15 19 97 71 17 70 33 10
63 40 61 32 8 51 44 67 35 38
55 13 72 4 69 79 3 42 99 9
Example 2
Use the =ASAPSUMBYFONTCOLOR() formula to SUM the values of cells with a red font:
The colorindex number for the red color = 3
Result: Formula used in B23:
Err:511 Err:511
th a blue font:
cell color as cell B10
820 Err:511
And now image that the colors have changed and you need to update the formula with the method used above
th a red font:
ula with the method used above…
««« back