Search This Blog

pCloud Crypto

The DGET function with example in Excel

The DGET function in Excel is used to extract a single value from a database (list or table) that matches specific criteria. It's similar to a database lookup operation, but it retrieves only one value based on the specified criteria.

The syntax for the DGET function is:

scss
DGET(database, field, criteria)

Where:

  • database: The range that makes up the database. It should include column headers.
  • field: The column label or index (numeric position) of the field from which you want to extract data.
  • criteria: A range containing the criteria you want to apply. The criteria range should include column labels and matching conditions.

Here's an example:

Suppose you have a database of student information with columns for Name, Age, and Grade. You want to extract the age of the student named "John".

css
| A | B | C | |---------|---------|-------| | Name | Age | Grade | |---------|---------|-------| | John | 20 | A | | Emily | 22 | B | | Alex | 21 | A | | Sarah | 19 | C |

To extract John's age using the DGET function:

less
=DGET(A1:C5, "Age", A8:B9)

Here, A1:C5 is the range of the database, "Age" is the column label you want to extract data from, and A8:B9 is the criteria range where A8 contains the label "Name" and B8 contains the condition "John".

This formula will return John's age, which is 20, because it matches the criteria specified in the criteria range.

No comments:

Post a Comment

pCloud Lifetime

Popular Posts