VBA Detail


Description :Microsoft Excel ABS function returns the absolute value of a number. ABS function is a built-in function in Excel that is categorized as a Math/Trig Function. It can be used as a worksheet function (WS) and a VBA function (VBA) in Excel. As a worksheet function, the ABS function can be entered as part of a formula in a cell of a worksheet. As a VBA function, you can use this function in macro code that is entered through the Microsoft Visual Basic Editor.
Syntax : abs(number)
ParameterNumber: a numeric value used to calculate the absolute value.
Exampleabs(-512.23) -> Result: 512.23
abs(512.23) -> Result: 512.23


Description :REPLACE function replaces a sequence of characters in a string with another set of characters.
Syntax :

Replace ( string1, find, replacement, [start, [count, [compare]]] )

Parameters :string1: string to replace a sequence of characters with another set of characters.
Find: String to be searched in string1
replacement: Replacement string for string1
start: This is the position in string1 to begin the search. If this parameter is omitted, the REPLACE function will begin the search at position 1.
compare: vbBinaryCompare = 0 .
vbTextCompare = 1. Textual comparison
vbDatabaseCompare = 2
count: This is the number of occurrences to replace. If this parameter is omitted, the REPLACE function will replace all occurrences of find with replacement.
ExampleReplace("ReplaceDemo", "e", "a", 4) -> Result: lacaDamo
Replace("ReplaceDemo", "e", "a") -> Result: RaplacaDamo