Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

How to Find the Last Row with Numerical Values in Excel VBA

Автор: vlogommentary

Загружено: 2025-12-29

Просмотров: 0

Описание:

Learn how to effectively find the last row containing any numerical value in a range using Excel VBA, avoiding issues with text values.
---
This video is based on the question https://stackoverflow.com/q/79382917/ asked by the user 'samysnes' ( https://stackoverflow.com/u/29340256/ ) and on the answer https://stackoverflow.com/a/79385173/ provided by the user 'Scott Craner' ( https://stackoverflow.com/u/4851590/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.

Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Excel VBA - How to find last row of range that contains any numerical value (not text)

Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.

If anything seems off to you, please feel free to drop me a comment under this video.
---
The Problem: Finding Last Row with Numbers Only

In Excel VBA, determining the last row that contains any data is common, but what if you only want the last row that contains numerical values, excluding text?

Using Range.Find with a wildcard (e.g., "*") returns any content, including text, which is not ideal if your range mixes numbers and text.

Why Range.Find Isn't Enough

[[See Video to Reveal this Text or Code Snippet]]

This finds the last non-empty cell but can't distinguish between numbers or text.

A Reliable VBA Approach: Using Application.Match

A better way is to leverage Application.Match with a very large number to find the last cell with a numerical value.

How it works

Application.Match searches for the largest number less than or equal to the lookup value.

By providing a number larger than any expected value, it returns the position of the last numeric entry.

Sample Code

[[See Video to Reveal this Text or Code Snippet]]

Notes

Replace 99999999999999999 with a number greater than your maximum expected numerical value.

If your data range is smaller, adjust Range("A:A") accordingly.

Summary

Range.Find with wildcards returns any content (text or numbers), not just numbers.

Using Application.Match with a large number returns the position of the last numeric cell efficiently.

This method is both simple and reliable for mixed-content ranges.



By applying this method, you can precisely detect the last row containing a numeric value, which is crucial for data processing tasks that differentiate numbers from text.

How to Find the Last Row with Numerical Values in Excel VBA

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Перестаньте повторять формулы! Используйте функцию MAP в Excel.

Перестаньте повторять формулы! Используйте функцию MAP в Excel.

How to Move Data Automatically Between Excel Files

How to Move Data Automatically Between Excel Files

Как вставить выбор даты в Excel | Надстройка «Мини-календарь» | Секретный трюк с VBA!

Как вставить выбор даты в Excel | Надстройка «Мини-календарь» | Секретный трюк с VBA!

Каждая функция VBA за 10 минут

Каждая функция VBA за 10 минут

Прекратите ручной ввод данных: объяснение работы таблиц данных NotebookLM для бухгалтеров.

Прекратите ручной ввод данных: объяснение работы таблиц данных NotebookLM для бухгалтеров.

Как называть БЕСПОЛЕЗНО БОЛЬШИЕ числа

Как называть БЕСПОЛЕЗНО БОЛЬШИЕ числа

No Epoxy Required.

No Epoxy Required.

Срочные переговоры с Путиным / Вывод части войск

Срочные переговоры с Путиным / Вывод части войск

25 Запрещенных Гаджетов, Которые Вы Можете Купить Онлайн

25 Запрещенных Гаджетов, Которые Вы Можете Купить Онлайн

How to Clean Data in Excel in 10 Minutes (Free File)

How to Clean Data in Excel in 10 Minutes (Free File)

Обучение EXCEL. УРОК 3: Ввод и редактирование данных на рабочем листе.

Обучение EXCEL. УРОК 3: Ввод и редактирование данных на рабочем листе.

Как извлечь данные из другой таблицы в отчеты Excel с помощью функций ВПР и ПРОСМОТР X

Как извлечь данные из другой таблицы в отчеты Excel с помощью функций ВПР и ПРОСМОТР X

Automated Data Entry Form in Excel | VBA Tutorial

Automated Data Entry Form in Excel | VBA Tutorial

Pivot Table Excel | Step-by-Step Tutorial

Pivot Table Excel | Step-by-Step Tutorial

Automatically Highlight Entire Row Based on a Status | Excel Conditional Formatting

Automatically Highlight Entire Row Based on a Status | Excel Conditional Formatting

VLOOKUP in Excel | Step-by-Step Tutorial for Beginners

VLOOKUP in Excel | Step-by-Step Tutorial for Beginners

Сводные таблицы Excel с нуля до профи за полчаса + Дэшборды! | 1-ое Видео курса

Сводные таблицы Excel с нуля до профи за полчаса + Дэшборды! | 1-ое Видео курса "Сводные Таблицы"

Learn 80% of Data Analysis in Excel in Just 12 Minutes

Learn 80% of Data Analysis in Excel in Just 12 Minutes

7 уровней больших чисел

7 уровней больших чисел

Создание таблицы в Excel простыми словами / Урок excel для начинающих

Создание таблицы в Excel простыми словами / Урок excel для начинающих

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com