ABSDB Function (LibreOffice Calc)

Mathematical Intermediate LibreOffice Calc LibreOffice 3.0

The ABSDB function returns the absolute value of a number stored in a database field reference. It is used primarily in legacy spreadsheet models and database-linked sheets.

The **ABSDB** function returns the **absolute value** of a number retrieved from a database field reference. It is a legacy function maintained for compatibility with older OpenOffice/StarOffice database‑driven spreadsheets.

What the ABSDB Function Does

  • Returns the absolute value of a number
  • Accepts direct numeric input or database field references
  • Useful in legacy models where values are pulled from external data sources
  • Behaves similarly to ABS, but exists for compatibility with older database‑linked sheets

Syntax

ABSDB(number)

Arguments

  • number:
    A numeric value or a reference to a database field containing a number.

Basic Examples

Absolute value of a number

=ABSDB(-42)
→ 42

Absolute value of a cell reference

=ABSDB(A1)

Absolute value of a database field reference

=ABSDB('sales.dbf'.Amount)

Advanced Examples

Normalize imported negative values

=ABSDB(VLOOKUP(ID; SalesTable; 3; 0))

Clean up sign‑flipped accounting data

=ABSDB(DATEVALUE(A1) - DATEVALUE(A2))

Combine with ROUND

=ROUND(ABSDB(A1); 2)

Combine with CONVERT for unit‑normalized absolute values

=ABSDB(CONVERT(A1; "ft"; "m"))

Edge Cases and Behavior Details

ABSDB returns a numeric value

Accepts:

  • Numbers
  • Cell references
  • Database field references
  • Expressions that evaluate to numbers

Invalid text → Err:502

Behavior details

  • ABSDB is functionally equivalent to ABS for most modern spreadsheets
  • Exists primarily for compatibility with older database‑linked models
  • Does not modify the underlying data source
  • Non‑numeric input results in an error

ABSDB of an error → error propagates

Common Errors and Fixes

Err:502 — Invalid argument

Cause:

  • Input is text
  • Database field does not contain numeric data

Fix:

  • Wrap with VALUE
  • Validate database field types

Err:504 — Invalid reference

Cause:

  • Database source missing or disconnected

Fix:

  • Reconnect data source
  • Verify field names

Best Practices

  • Prefer ABS for modern spreadsheets
  • Use ABSDB only when maintaining legacy database‑linked models
  • Validate database field types before applying ABSDB
  • Combine with VALUE to sanitize imported text‑numbers
ABSDB is a legacy‑compatibility absolute‑value function — ideal for maintaining older database‑linked spreadsheets while ensuring numeric consistency.
  • Use ABS for standard absolute‑value operations
  • Use VALUE to convert text to numbers
  • Use ROUND, TRUNC, or INT for numeric shaping
  • Use CONVERT for unit‑normalized absolute values

By mastering ABSDB and its modern alternatives, you can maintain compatibility with legacy database‑driven spreadsheets while building clean, reliable numeric workflows in LibreOffice Calc.