# AND/OR Function for COUNTIF Referencing another sheet

✭✭✭
edited 02/15/24

Hello, Smartsheets Gurus!

I am building a formula to reference another sheet {ISIR Pulls 2023-2024, Column EX Major (Range)} with two different EX Majors within the range I'm trying to total up. The two things I am looking to identify are EX Major "BSC" and "BSD".

If I just do:

=COUNTIF({ISIR Pulls 2023-2024 Range 1}, ="BSC") I get 8. (which is correct)

=COUNTIF({ISIR Pulls 2023-2024 Range 1}, ="BSD") I get 1. (which is correct)

However, when I try to factor in both "BSC" or "BSD" into my formula, I'm getting #UNPARSEABLE. I should be getting a total of 9.

I feel like I'm close, yet so far....here is my formula. I'm not going to pretend I understand where the OR goes.

=COUNTIFS({ISIR Pulls 2023-2024 Range 1}, "BSC", OR COUNTIFS({ISIR Pulls 2023-2024 Range 1}, "BSD"))

What am I doing wrong?🤷

Tags:

• ✭✭✭✭✭
```=COUNTIF﻿(
{ISIR Pulls 2023-2024 Range 1},
OR(@cell = "BSC", @cell = "BSD")
)

```

...

• ✭✭✭✭✭
```=COUNTIF﻿(
{ISIR Pulls 2023-2024 Range 1},
OR(@cell = "BSC", @cell = "BSD")
)

```

...

• ✭✭✭

@heyjay you are amazing!!! It worked just like that!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!