Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

#### Post your problem and you’ll get Expert help in seconds.

Your message must be at least 40 characters
Our professional Expert are available now. Your privacy is guaranteed.

# How to Search an Entire Worksheet for a Value

We can search AN EXCEL WORKSHEET for a certain value and get a numeric count for the number of occurrence of the value with the COUNTIF function. This article will walk through the process.

Figure 1: How to Search an Entire Worksheet for a Value

## Syntax

`=COUNTIF(range, criteria)`

## Formula

The formula in Cell C5 is:

`=COUNTIF(Sheet2!1:1048576,C4)`

## Setting up the Data

We will set up the data to search for Peter and get a numeric count by doing the following:

• We will open an EXCEL WORKSHEET
• We will type the data into SHEET 1 and SHEET 2. We are searching for the number of times the name PETER appears in SHEET 2.

Figure 2: Setting up the Data

## Search Entire Worksheet for Value

To search SHEET2 for the name PETER, we will do the following:

• We will click on Cell C5 in SHEET1

• We will insert the formula below into Cell C5

`=COUNTIF(Sheet2!1:1048576,C4)`

• We will press the enter key

Figure 3: Result of the Search and Count of PETER in the Entire Worksheet

## Explanation

The value (PETER) in Cell C4 is searched for in the entire RANGE (SHEET 2) and the COUNTIF function displays the numeric result for all Cells that fulfills the CRITERIA.

## Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

### Did this post not answer your question? Get a solution from connecting with the expert.

Solution examples
I need a formula to count the number of rows that contain at least one of two possible phrases, but not give me the total number of instances that both phrases occur overall.
Solved by E. B. in 33 mins
i need to have whatever data i input in excelsheet file #1 column A automatically transfer to another worksheet/ another file#2 column B
Solved by I. H. in 20 mins
how do you make a cell automatically change colour based on the colour of other cells.ie i want to have a series of cells, perhaps 100, if any of these cells are red i want a seperate cell to be red, once all the red ones have changed colour the red cell can turn green??
Solved by V. C. in 60 mins
I have a sheet of 4 columns. Step1 - Column C has addresses and I want that column separately worked on: remove bad addresses and leave the good ones. Step2 - I want Column C (now with only the good addresses) brought back into the sheet and for all the "good addresses" cells to align back with the other cells that were on their individual rows.
Solved by T. C. in 60 mins
i have a table with Dates, First names , Last names and i want to count how many times a name occurs, but if a name occurs more than once on a particular date i need to only count it once. this is on excel and not google sheets
Solved by F. H. in 31 mins