Skip to content

Tìm / Thay thế hàng loạt (Bulk Find / Replace)

Gói Standard

Tính năng có sẵn ở bản Standard trở lên. Bản free / trial cũng dùng được nhưng có giới hạn.

Dialog modeless mạnh hơn Ctrl+H mặc định: hỗ trợ regex, multi-rule, multi-sheet, recipes lưu lại tái sử dụng. Lý tưởng cho công việc làm sạch dữ liệu BoQ / khối lượng / báo cáo hàng loạt.

Mở dialog

DVD Addin → nhóm Văn bản và Số → dropdown Xử lý văn bản → bấm Tìm/thay thế hàng loạt.

Dialog mở modeless — anh có thể chỉnh selection trong Excel giữa các lần Apply mà không cần đóng dialog.

So sánh với Find/Replace của Excel

Find/Replace ExcelBulk Find/Replace DVDAddin
Regex✅ .NET Regex full
Multi-rule❌ (1 cặp mỗi lần)✅ N rules chạy 1 phát
ScopeWorkbook hiện tạiActive sheet / Selected sheets / Workbook
Save recipe✅ JSON file tái dùng
Preview trước Apply✅ Highlight matches + count
Undo❌ (mất history)✅ Excel undo stack

Workflow điển hình

1. Thêm rule

FieldÝ nghĩa
FindText hoặc regex pattern cần tìm
ReplaceText thay thế (có thể chứa $1, $2... khi dùng regex group)
Use RegexTick → field Find được parse như .NET Regex
Match casePhân biệt hoa thường
Whole wordMatch nguyên từ (không phải substring)
In formulasTìm trong công thức thay vì giá trị display

Bấm ➕ Add rule để thêm rule mới (1 dialog chạy nhiều rule song song).

2. Chọn scope

OptionMô tả
SelectionChỉ trong vùng đang chọn
Active sheetToàn bộ sheet đang mở
All sheetsMọi sheet trong workbook
Selected sheetsSheet đang group (Ctrl+click tab để group)

3. Bấm "Find all" hoặc "Replace all"

  • Find all → highlight mọi match (không thay thế). Dialog báo: "Found 47 matches in 12 cells across 3 sheets".
  • Replace all → thay thế thực. Trước đó hiện confirm dialog "Replace 47 occurrences. Continue?".

Ví dụ regex hay dùng

Use caseFindReplace
Bỏ ký tự đặc biệt cuối tên\s*\(.*?\)\s*$(rỗng)
Format số tiền VND(\d+)000$1.000
Chuẩn hoá mã định mứcAB\.(\d{4,5})AB.$1.00
Convert ngày MM/DD → DD/MM(\d{2})/(\d{2})/(\d{4})$2/$1/$3
Xoá whitespace cuối dòng[ \t]+$(rỗng)
Gộp nhiều space thành 1\s{2,} (1 space)

Recipes — lưu rule set

Mỗi recipe = 1 nhóm rules + scope, lưu thành file JSON ở %APPDATA%\DVDAddin\Recipes\.

Thao tácMô tả
💾 Save recipeĐặt tên recipe (vd "Chuẩn hoá BoQ TT10") → save JSON
📂 Load recipeList dropdown các recipe đã save → click → nạp rules + scope
🗑 Delete recipeXóa file recipe

Recipe nên dùng cho:

  • Chuẩn hoá định mức (AB.11110 → AB.11110.00)
  • Chuyển đổi format ngày tháng khi nhận file từ đối tác
  • Cleanup name công trình theo template

License gating

TierDùng được
Trial / Activated✅ Tất cả tính năng
Standard✅ Tất cả
Pro✅ Tất cả
Expired / Unactivated🔒 Lock — cần kích hoạt

Tips

  • Test regex trước: dùng Find all trước khi Replace. Nếu found number wrong → sửa pattern
  • Sao lưu workbook: regex sai có thể wipe data. Save trước khi Replace all
  • Combine với Data Cleaning: Bulk Find/Replace fix sai sót pattern-based, Data Cleaning fix sai sót structural (trống/dòng trùng/whitespace)

Liên quan

Released under DVDAddin License.