BA excel
BA excel
**Example:**
Using the same table as above:
```
=XLOOKUP(2, A2:A4, C2:C4, "Not Found")
```
This will return **60000**.
**Example:**
If you want to fetch all data for ID 2:
```
=INDEX(A2:C4, MATCH(2, A2:A4, 0), 0)
```
This will return all values (ID 2, Name Mary, Salary 60000).
**Example:**
```
=IF(A2 >= 90, "Excellent", IF(A2 >= 75, "Good", IF(A2 >=
50, "Average", "Poor")))
```
This checks a score in A2 and categorizes it.
**Example:**
```
=INDEX(C2:C4, MATCH(2, A2:A4, 0))
```
This fetches the salary for ID 2, which returns **60000**.
**Steps:**
1. Select the range you want to format.
2. Go to Home > Conditional Formatting > New Rule.
3. Choose a rule type (e.g., "Format cells that contain").
4. Set the condition and formatting options.
5. Click OK.
**Example:**
```
=COUNTIF(A2:A10, ">50") // Counts cells greater than 50
=COUNTIFS(A2:A10, ">50", B2:B10, "<100") // Counts
cells in A greater than 50 and in B less than 100
```