XPlus


Download
Installation
Changelog
Support
X-VBA Home

Validators
=CREDIT_CARD_NAME
=FORMAT_CREDIT_CARD
=FORMAT_FORMULA
=FORMAT_FRACTION
=FORMAT_PHONE
=IS_CREDIT_CARD
=IS_EMAIL
=IS_IP_FOUR
=IS_MAC_ADDRESS
=IS_PHONE
=IS_URL

Utilities
=ADDIN_EXISTS
=ADDIN_INSTALLED
=AVERAGESHEET
=COUNTERRORALL
=DISPLAY_TEXT
=EVALUATE_FORMULA
=HIDDEN
=HTML_ESCAPE
=HTML_TABLEIFY
=HTML_UNESCAPE
=ISBADERROR
=ISERRORALL
=JAVASCRIPT
=JSONIFY
=MAXSHEET
=MINSHEET
=REFERENCE_EXISTS
=SPEAK_TEXT
=SUMSHEET
=UUID_FOUR

StringMetrics
=DAMERAU
=DAM_STR
=DAM_STR_OPT
=HAMMING
=LEVENSHTEIN
=LEV_STR
=LEV_STR_OPT
=PARTIAL_LOOKUP

StringManipulation
=CAMEL_CASE
=CAPITALIZE
=COMPANY_CASE
=COUNT_LOWERCASE_CHARACTERS
=COUNT_UPPERCASE_CHARACTERS
=COUNT_WORDS
=DEDENT
=ELITE_CASE
=FORMATTER
=INDENT
=INSPLIT
=INSTRING
=KEBAB_CASE
=LEFT_FIND
=LEFT_SEARCH
=LEFT_SPLIT
=REMOVE_CHARACTERS
=REPEAT
=REVERSE_TEXT
=REVERSE_WORDS
=RIGHT_FIND
=RIGHT_SEARCH
=RIGHT_SPLIT
=SCRAMBLE_CASE
=SHORTEN
=SPLIT_TEXT
=SUBSTITUTE_ALL
=SUBSTR
=SUBSTR_FIND
=SUBSTR_SEARCH
=TRIM_CHAR
=TRIM_LEFT
=TRIM_RIGHT
=ZFILL

Regex
=REGEX_REPLACE
=REGEX_SEARCH
=REGEX_TEST

Range
=ALTERNATE_COLUMNS
=ALTERNATE_ROWS
=AVERAGEHIGH
=AVERAGELOW
=AVERAGEN
=COLUMNIFY
=COUNT_UNIQUE
=COUNT_UNIQUE_COLORS
=FIRST_UNIQUE
=INRANGE
=MAXN
=MINN
=REVERSE_RANGE
=ROWIFY
=SORT_RANGE
=SUMHIGH
=SUMLOW
=SUMN

Random
=RANDBETWEENS
=RANDBOOL
=RANDOM_RANGE
=RANDOM_SAMPLE
=RANDOM_SAMPLE_PERCENT

Properties
=RANGE_COLOR
=RANGE_COMMENT
=RANGE_FONT
=RANGE_HEIGHT
=RANGE_HYPERLINK
=RANGE_NAME
=RANGE_NUMBER_FORMAT
=RANGE_WIDTH
=SHEET_CODE_NAME
=SHEET_NAME
=SHEET_TYPE
=WORKBOOK_AUTHOR
=WORKBOOK_CATEGORY
=WORKBOOK_COMMENTS
=WORKBOOK_COMPANY
=WORKBOOK_CREATION_DATE
=WORKBOOK_HYPERLINK_BASE
=WORKBOOK_KEYWORDS
=WORKBOOK_LAST_AUTHOR
=WORKBOOK_LAST_SAVE_TIME
=WORKBOOK_MANAGER
=WORKBOOK_REVISION_NUMBER
=WORKBOOK_SUBJECT
=WORKBOOK_TITLE

Polyfill
=CONCAT_TEXT
=MAX_IF
=MAX_IFS
=MIN_IF
=MIN_IFS
=TEXT_JOIN

Network
=HTTP
=PARSE_HTML_STRING
=SIMPLE_HTTP

Meta
=CREDITS
=DOCUMENTATION
=VERSION

Math
=INTERPOLATE_NUMBER
=INTERPOLATE_PERCENT

File
=COUNT_FILES
=COUNT_FILES_AND_FOLDERS
=COUNT_FOLDERS
=FILE_CREATION_TIME
=FILE_DRIVE
=FILE_EXTENSION
=FILE_FOLDER
=FILE_LAST_MODIFIED_TIME
=FILE_NAME
=FILE_PATH
=FILE_SIZE
=FILE_TYPE
=GET_FILE_NAME
=PATH_JOIN
=READ_FILE
=WRITE_FILE

Environment
=COMPUTER_NAME
=ENVIRONMENT
=OS
=USER_DOMAIN
=USER_NAME

DateTime
=DAYS_OF_MONTH
=MONTH_NAME
=QUARTER
=TIME_CONVERTER
=WEEKDAY_NAME
=WEEK_OF_MONTH

Color
=HEX2HSL
=HEX2RGB
=HSL2HEX
=HSL2RGB
=RGB2HEX
=RGB2HSL
=RGB2HSV

XPlus  

Color Module

This module contains a set of functions for working with colors


=HEX2HSL(hexColorString)

This function converts a HEX color value into an HSL color value

Arguments

String: hexColorString   --->   is the hex color


Returns

String: Returns a string with the HSL value of the color


Examples

  • =HEX2HSL("084080") -> "(212.0, 88.2%, 26.7%)"
  • =HEX2HSL("#084080") -> "(212.0, 88.2%, 26.7%)"

=HEX2RGB(hexColorString, [singleColorNumberOrName])

This function converts a HEX color value into an RGB color value, or optionally a single value from the RGB value.

Arguments

String: hexColorString   --->   is the color in HEX format

[(Optional) Variant = -1: singleColorNumberOrName]   --->   is a number or string that specifies which of the single color values to return. If this is set to 0 or "Red", the red value will be returned. If this is set to 1 or "Green", the green value will be returned. If this is set to 2 or "Blue", the blue value will be returned.


Returns

Variant: Returns a string with the RGB value of the color or the number of the individual color chosen


Examples

  • =HEX2RGB("FFFFFF") -> "(255, 255, 255)"
  • =HEX2RGB("FF0109", 0) -> 255; The red color
  • =HEX2RGB("FF0109", "Red") -> 255; The red color
  • =HEX2RGB("FF0109", 1) -> 1; The green color
  • =HEX2RGB("FF0109", "Green") -> 1; The green color
  • =HEX2RGB("FF0109", 2) -> 9; The blue color
  • =HEX2RGB("FF0109", "Blue") -> 9; The blue color

=HSL2HEX(hueValue, saturationValue, lightnessValue)

This function converts an HSL color value into a HEX color value.

Arguments

Double: hueValue   --->   is the hue value

Double: saturationValue   --->   is the saturation value

Double: lightnessValue   --->   is the lightness value


Returns

Variant: Returns a string with the HEX value of the color


Examples

  • =HSL2RGB(212, .882, .267) -> "(8, 64, 128)"

=HSL2RGB(hueValue, saturationValue, lightnessValue, [singleColorNumberOrName])

This function converts an HSL color value into an RGB color value, or optionally a single value from the RGB value.

Arguments

Double: hueValue   --->   is the hue value

Double: saturationValue   --->   is the saturation value

Double: lightnessValue   --->   is the lightness value

[(Optional) Variant = -1: singleColorNumberOrName]   --->   is a number or string that specifies which of the single color values to return. If this is set to 0 or "Red", the red value will be returned. If this is set to 1 or "Green", the green value will be returned. If this is set to 2 or "Blue", the blue value will be returned.


Returns

Variant: Returns a string with the RGB value of the color or an individual color value


Examples

  • =HSL2RGB(212, .882, .267) -> "(8, 64, 128)"
  • =HSL2RGB(212, .882, .267, 0) -> 8
  • =HSL2RGB(212, .882, .267, "Red") -> 8
  • =HSL2RGB(212, .882, .267, 1) -> 64
  • =HSL2RGB(212, .882, .267, "Green") -> 64
  • =HSL2RGB(212, .882, .267, 2) -> 128
  • =HSL2RGB(212, .882, .267, "Blue") -> 128

=RGB2HEX(redColorInteger, greenColorInteger, blueColorInteger)

This function converts an RGB color value into a HEX color value

Arguments

Integer: redColorInteger   --->   is the red value

Integer: greenColorInteger   --->   is the green value

Integer: blueColorInteger   --->   is the blue value


Returns

String: Returns a string with the HEX value of the color


Examples

  • =RGB2HEX(255, 255, 255) -> "FFFFFF"

=RGB2HSL(redColorInteger, greenColorInteger, blueColorInteger, [singleColorNumberOrName])

This function converts an RGB color value into an HSL color value and returns a string of the HSL value, or optionally a single value from the HSL value.

Arguments

Integer: redColorInteger   --->   is the red value

Integer: greenColorInteger   --->   is the green value

Integer: blueColorInteger   --->   is the blue value

[(Optional) Variant = -1: singleColorNumberOrName]   --->   is a number or string that specifies which of the single color values to return. If this is set to 0 or "Hue", the hue value will be returned. If this is set to 1 or "Saturation", the saturation value will be returned. If this is set to 2 or "Lightness", the lightness value will be returned.


Returns

Variant: Returns a string with the HSL value of the color


Examples

  • =RGB2HSL(8, 64, 128) -> "(212.0�, 88.2%, 26.7%)"
  • =RGB2HSL(8, 64, 128, 0) -> 212
  • =RGB2HSL(8, 64, 128, "Hue") -> 212
  • =RGB2HSL(8, 64, 128, 1) -> .882
  • =RGB2HSL(8, 64, 128, "Saturation") -> .882
  • =RGB2HSL(8, 64, 128, 2) -> .267
  • =RGB2HSL(8, 64, 128, "Lightness") -> .267

=RGB2HSV(redColorInteger, greenColorInteger, blueColorInteger, [singleColorNumberOrName])

This function converts an RGB color value into an HSV color value, or optionally a single value from the HSV value.

Arguments

Integer: redColorInteger   --->   is the red value

Integer: greenColorInteger   --->   is the green value

Integer: blueColorInteger   --->   is the blue value

[(Optional) Variant = -1: singleColorNumberOrName]   --->   is a number or string that specifies which of the single color values to return. If this is set to 0 or "Hue", the hue value will be returned. If this is set to 1 or "Saturation", the saturation value will be returned. If this is set to 2 or "Value", the value value will be returned.


Returns

Variant: Returns a string with the RGB value of the color or an individual color value


Examples

  • =RGB2HSV(8, 64, 128) -> "(212.0, 93.8%, 50.2%)"
  • =RGB2HSV(8, 64, 128, 0) -> 212
  • =RGB2HSV(8, 64, 128, "Red") -> 212
  • =RGB2HSV(8, 64, 128, 1) -> .938
  • =RGB2HSV(8, 64, 128, "Green") -> .938
  • =RGB2HSV(8, 64, 128, 2) -> .502
  • =RGB2HSV(8, 64, 128, "Blue") -> .502