How to Filter Integers in Google Sheets: A Juicy Guide

To make your Google Sheets experience even more efficient, it’s important to know how to filter integers in a list. With the help of the FILTER function and a few nifty tricks, you can easily achieve this. In this guide, we’ll walk you through the process step by step and even share some bonus tips on highlighting and marking whole numbers. Get ready to become a Google Sheets pro!

Filtering Integers with the FILTER Function

To filter integers using the FILTER function, follow these simple steps:

  1. Use the following syntax: FILTER(range, condition1, [condition2, ...]).
  2. Let’s assume your range is B1:B, with B1 containing the field label.
  3. Apply the FILTER formula: =FILTER(B2:B, B2:B = INT(B2:B)).
    • B2:B is the range of cells to be filtered.
    • B2:B = INT(B2:B) is the condition that checks if the value in each cell is an integer.

The INT function converts the numbers in the array to integers, allowing the formula to compare the original and converted values. This array formula returns multiple values based on the number of whole numbers in the list. Just make sure you have enough blank cells below the formula to accommodate the results.

Filter Integers in Google Sheets with FILTER Function

Filtering Integers Using the Filter Menu

Alternatively, you can filter integers using the Filter menu. Here’s how:

  1. Select the range B1:B.
  2. Go to Data > Create a filter or right-click on cell B1 and choose Create a filter.
  3. Follow these five steps:
    • Click on the Filter dropdown menu icon in cell B1.
    • Select Filter by condition.
    • Choose Custom formula is.
    • Input =B2=INT(B2) in the given field.
    • Click OK.

This method applies the filter directly to the source list, allowing you to filter the data without creating a new range.

Filter Integers in Google Sheets with Filter Menu

FILTER Function vs. Filter Menu

To help you decide between the two methods, consider the following:

Filter Menu Command:

  • Creates the filter in the source list.
  • Requires manually refreshing the filter when adding new values to the filtered range.

FILTER Function:

  • Filters integers to a new range.
  • Automatically includes new values if the range is open.

Choose the method that best suits your needs and workflow. It’s all about finding what works best for you!

Highlighting Integers with Conditional Formatting

If you want to visually highlight integers in your Google Sheets, you can use conditional formatting. Follow these steps:

  1. Go to Format > Conditional formatting.
  2. In the Apply to range field, enter the range B2:B or B2:B16.
  3. In the Format rules section, select Custom formula is.
  4. Input =AND(B2 > 0, B2 = INT(B2)) as the custom formula.
  5. Click Done.

Now, all the cells containing integers will be visually highlighted, making them easier to spot at a glance.

Marking or Extracting Whole Numbers

Sometimes, you may need to mark or extract the rows that contain whole numbers. Here’s how to do it:

  1. Use the ARRAYFORMULA function in a blank cell, such as C2.
  2. Enter the following formula: =ARRAYFORMULA(LET(range, B2:B, test, IF(INT(range) = range, TRUE, FALSE), IF(range="", , test))).

This formula will return TRUE against integers and FALSE against decimals. You can replace TRUE and FALSE with custom values if desired. To extract only the integers, use this adjusted formula: =ARRAYFORMULA(LET(range, B2:B, test, IF(INT(range) = range, TRUE, FALSE), IF(test = TRUE, range, ))).

Extracting Whole Numbers in Google Sheets

Final Thoughts

Now that you know how to filter integers, highlight them, and even mark or extract them in Google Sheets, you can take your data management skills to the next level. Experiment with these techniques and see how they can simplify your work and boost your productivity. Happy Sheets-ing!

For more tips and tricks on utilizing Google Sheets, check out Crawlan.com and become a spreadsheet superstar!

Related posts