Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 752857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:49:49+00:00 2026-05-14T14:49:49+00:00

I have a Google Spreadsheet with 3 columns that are either blank or have

  • 0

I have a Google Spreadsheet with 3 columns that are either blank or have a value. I want to get the count of the number of rows that has A and either B or C populated. If I were writing a SQL query it would be

select count(*) 
from Table 
where A is not null and (B is not null or C is not null)

But I can’t for the life of me figure out how to get this in a Google Spreadsheet

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:49:50+00:00Added an answer on May 14, 2026 at 2:49 pm

    The formula below should do what you are after:

    =ROWS(FILTER(A2:A, NOT(ISBLANK(A2:A)), NOT(ISBLANK(B2:B))+NOT(ISBLANK(C2:C)) ))
    

    And to explain:

    • ROWS counts the rows of the argument (filtered, in our case)
    • FILTER returns the rows of arg1 (A2:A) that all subsequent arguments match
    • The + (addition) symbol combines two predicates with a logical OR

    Finally, if you are not using header columns you can change the references from A2:A to A:A

    Alternatively, you can use the QUERY function:

    (Broken into multiple lines for readability)

    =ROWS(QUERY(A2:C, 
        "SELECT A WHERE A IS NOT NULL AND (B IS NOT NULL OR C IS NOT NULL)"))
    

    For more information on the syntax of the queries, see the Visualization API Query Language Reference and specifically the Language Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a google spreadsheet with multiple columns that have variable row counts in
I have a google spreadsheet that looks like this, for budget keeping. I want
I have a Range of all rows and columns in my Google Spreadsheet. I'm
I have a form that fills in a Google Spreadsheet. One of the columns
I have a Google Sheets that has two columns. Second column is numbers only,
I have a Google Spreadsheet with many hidden rows in it, and I want
I have a user that created about 50 sheets inside a Google Spreadsheet. Each
I have a google spreadsheet that uses this function: =SUM(E:E) - SUM(C:C) It adds
I have the following formula that works out the value of all the rows
I have three scripts that are in a google docs spreadsheet. In this spreadsheet,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.