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:
| Function | Purpose |
|---|---|
dvdAIExplain | Ask an AI to explain the Excel formula in a cell. |
dvdTranslate | Translate text with Google Translate. |
dvdStock | Fetch the price of a Vietnamese listed share. |
DVDFx | Fetch an exchange rate, latest or for a given date. |
dvdQR | Build a QR code from text and insert it into the cell. |
dvdPic | Insert a picture into a cell, scaled to fit. |
dvdColorShapes | Recolour several shapes from a list, with transparency. |
dvdMoveShape | Move 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])| Parameter | Required | Description |
|---|---|---|
cell_formula | Yes | Cell holding the formula to explain. |
Detail | No | TRUE = 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)| Parameter | Required | Description |
|---|---|---|
Text | Yes | Text to translate. |
FromLang | Yes | Source language code, for example "vi", "en". |
ToLang | Yes | Target 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])| Parameter | Required | Description |
|---|---|---|
MaSIC | Yes | Ticker symbol, for example "VCB". |
match_mode | No | 1 = 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 answerNotes
- Requires an internet connection; an unknown ticker returns
#N/A. - Mode
1converts 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])| Parameter | Required | Description |
|---|---|---|
from | Yes | Source currency code, for example "USD", "EUR". |
to | Yes | Target currency code, for example "VND", "JPY". |
date | No | Rate 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/2026Notes
- 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])| Parameter | Required | Description |
|---|---|---|
Text | Yes | Text to encode as a QR code. |
charsetName | No | Character 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 phoneNotes
- 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])| Parameter | Required | Description |
|---|---|---|
ImgPath | Yes | Path to the picture; a relative path is resolved against the folder of the workbook. |
FitMode | No | TRUE = scale to the cell (default). |
Space | No | Padding around the picture, in pixels. |
Extensions | No | Default 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 itNotes
- 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])| Parameter | Required | Description |
|---|---|---|
ShapeList | Yes | Two-column range: shape name and RGB colour code. |
TargetSheetName | No | Name of the sheet holding the shapes; empty means the active sheet. |
ShapeTransparency | No | Transparency 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 statusNotes
- 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])| Parameter | Required | Description |
|---|---|---|
ShapeName | Yes | Name of the shape to move. |
NewPosition | Yes | New position as the string "Top;Left". |
TargetSheet | No | Name 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 I6Notes
- The position string always uses a semicolon between
TopandLeft, whatever the regional format is. - The function returns
TRUEon success andFALSEwhen the shape name, the position format or the sheet name is wrong.