Skip to content

AI, network & shape functions

This group contains the 8 functions that reach beyond the spreadsheet: asking an AI to explain a formula, translating text, fetching stock prices and exchange rates, generating QR codes, placing site photos into cells, and colouring or moving shapes on a worksheet.

The examples below use a semicolon ; to separate arguments (Excel running on a Vietnamese regional format). If your Excel uses the English (US) format, type a comma , instead of ;.

Quick reference:

FunctionPurpose
dvdAIExplainAsk an AI to explain the Excel formula in a cell.
dvdTranslateTranslate text with Google Translate.
dvdStockFetch the price of a Vietnamese listed share.
DVDFxFetch an exchange rate, latest or for a given date.
dvdQRBuild a QR code from text and insert it into the cell.
dvdPicInsert a picture into a cell, scaled to fit.
dvdColorShapesRecolour several shapes from a list, with transparency.
dvdMoveShapeMove a shape to new coordinates on the worksheet.

dvdAIExplain

Sends the formula of a cell to an AI model and returns the explanation in Vietnamese.

Syntax:

=dvdAIExplain(cell_formula; [Detail])
ParameterRequiredDescription
cell_formulaYesCell holding the formula to explain.
DetailNoTRUE = detailed explanation (default), FALSE = short explanation.

Example:

=dvdAIExplain(F42; FALSE)
// → "Công thức nhân khối lượng ở cột D với đơn giá ở cột E rồi làm tròn 0 chữ số."

Notes

  • Requires a Gemini API key configured in Tùy chọn (Options) and an internet connection.
  • The function runs asynchronously: the cell shows #N/A waiting... and updates itself once the answer arrives.
  • The argument must point at a cell that contains a formula; otherwise the function returns Ô không chứa công thức MS Excel ("the cell holds no formula").

dvdTranslate

Translates a piece of text with Google Translate — for bilingual documents and correspondence with foreign consultants.

Syntax:

=dvdTranslate(Text; FromLang; ToLang)
ParameterRequiredDescription
TextYesText to translate.
FromLangYesSource language code, for example "vi", "en".
ToLangYesTarget language code.

Example:

=dvdTranslate(B6; "vi"; "en")
// → "Concrete works for foundation M1"

=dvdTranslate("Biên bản nghiệm thu công việc xây dựng"; "vi"; "en")
// → "Minutes of acceptance of construction work"

Notes

  • Requires an internet connection; the function returns #VALUE! when no translation comes back.
  • Best used cell by cell; filling hundreds of rows at once is slow and may get throttled.

dvdStock

Fetches the price of a Vietnamese listed share by ticker.

Syntax:

=dvdStock(MaSIC; [match_mode])
ParameterRequiredDescription
MaSICYesTicker symbol, for example "VCB".
match_modeNo1 = PriceBoard.vcbs.com.vn source (default), 2 = quotes.vcbs.com.vn source.

Example:

=dvdStock("VCB")
// → 92500 (latest matched price, in dong)

=dvdStock(B6; 2)
// → price from the fallback source when the default one does not answer

Notes

  • Requires an internet connection; an unknown ticker returns #N/A.
  • Mode 1 converts the board price into dong (multiplied by 1,000).

DVDFx

Fetches the conversion rate between two currencies, either the latest rate or the rate of a past date.

Syntax:

=DVDFx(from; to; [date])
ParameterRequiredDescription
fromYesSource currency code, for example "USD", "EUR".
toYesTarget currency code, for example "VND", "JPY".
dateNoRate date, as yyyy-MM-dd or dd/MM/yyyy; empty means the latest rate.

Example:

=DVDFx("USD"; "VND")
// → 25,400 (latest rate, used to convert a contract value in foreign currency)

=DVDFx("USD"; "VND"; "2026-06-30")
// → the rate at the cut-off date of the payment period, 30/06/2026

Notes

  • Requires an internet connection; the function runs asynchronously, so the cell shows #N/A waiting... on the first fetch.
  • Results are cached for one hour per currency pair and date, so later recalculations answer instantly.
  • Two identical currency codes return 1; an empty code returns #VALUE!.

dvdQR

Builds a QR code from a text string and inserts the picture into the formula cell.

Syntax:

=dvdQR(Text; [charsetName])
ParameterRequiredDescription
TextYesText to encode as a QR code.
charsetNameNoCharacter set, "UTF-8" by default (keeps Vietnamese diacritics); pass "Shift_JIS" for the Japanese character set, which strips diacritics.

Example:

=dvdQR(A6)
// → a QR code carrying the member mark, for identification tags on site

=dvdQR("https://hoso.congtrinh.vn/bb/BB-2026-0142")
// → a QR code that opens the acceptance record on a phone

Notes

  • The function itself returns an empty string; the real output is the QR picture inserted into the cell and centred on its merge area.
  • Any earlier picture overlapping the cell is deleted before the new one is inserted.

dvdPic

Inserts a picture from a path into a cell, scaling it to fit and leaving optional padding.

Syntax:

=dvdPic(ImgPath; [FitMode]; [Space]; [Extensions])
ParameterRequiredDescription
ImgPathYesPath to the picture; a relative path is resolved against the folder of the workbook.
FitModeNoTRUE = scale to the cell (default).
SpaceNoPadding around the picture, in pixels.
ExtensionsNoDefault file extension when the path has none, ".jpg" by default.

Example:

=dvdPic("Anh\BB-0142-01.jpg")
// → inserts the site photo into the photo appendix of an acceptance record

=dvdPic(B6; TRUE; 6)
// → picture named in B6, with 6 px of padding around it

Notes

  • The formula cell shows an empty string; the picture is drawn right after Excel finishes calculating, so it may appear one beat later.
  • When printing or exporting many pages, use the DVDAddin print command so that pictures are refreshed before the export and the previous photo is not printed.
  • One picture per cell: the cell's own previous picture is deleted before the new one is drawn.
  • A workbook stored on OneDrive/SharePoint that is not synced locally makes the function return a message starting with ERR:.

dvdColorShapes

Changes the fill colour and transparency of several shapes on a worksheet from a list of shape names and colour codes.

Syntax:

=dvdColorShapes(ShapeList; [TargetSheetName]; [ShapeTransparency])
ParameterRequiredDescription
ShapeListYesTwo-column range: shape name and RGB colour code.
TargetSheetNameNoName of the sheet holding the shapes; empty means the active sheet.
ShapeTransparencyNoTransparency between 0 and 1, 0 by default.

Example:

=dvdColorShapes($H$6:$I$40; "Mat bang"; 0.2)
// → "Done", colouring the zones of the site layout by completion status

Notes

  • The colour column must hold RGB numbers; an invalid value makes the function return Cột mã màu không hợp lệ. ("invalid colour column").
  • A sheet name that does not exist returns the message Sheet '<name>' không tồn tại. ("sheet does not exist").
  • Shape names that cannot be found are skipped; the remaining shapes are still coloured.

dvdMoveShape

Moves a drawing, picture or text box to new coordinates on the worksheet.

Syntax:

=dvdMoveShape(ShapeName; NewPosition; [TargetSheet])
ParameterRequiredDescription
ShapeNameYesName of the shape to move.
NewPositionYesNew position as the string "Top;Left".
TargetSheetNoName of the sheet holding the shape; empty means the active sheet.

Example:

=dvdMoveShape("MuiTenTienDo"; "120;340"; "Tien do")
// → TRUE, moving the milestone arrow to the current week

=dvdMoveShape("Cau_thap"; H6 & ";" & I6)
// → moves the tower-crane symbol to the coordinates computed in H6 and I6

Notes

  • The position string always uses a semicolon between Top and Left, whatever the regional format is.
  • The function returns TRUE on success and FALSE when the shape name, the position format or the sheet name is wrong.

Released under DVDAddin License.