Перейти до основного матеріалу

Як витягти всі записи між двома датами в Excel?

Ось діапазон даних в Excel, і в цьому випадку я хочу витягти всі записи рядків між двома датами, як показано на скріншоті нижче, чи є у вас ідеї для швидкої роботи з цією роботою, не шукаючи дані та не витягуючи їх по черзі вручну?

doc витяг запису між датами 1 постріл стрілка вправо doc витяг запису між датами 2

Витягніть усі записи між двома датами за формулами

Витягніть усі записи між двома датами за допомогою Kutools для Excelгарна ідея3


Витягніть усі записи між двома датами за формулами

Щоб витягти всі записи між двома датами в Excel, потрібно виконати такі дії:

1. Створіть новий аркуш, Аркуш2, і введіть дату початку та дату закінчення у дві клітинки, наприклад, А1 та В1. Дивіться знімок екрана:
doc витяг запису між датами 3

2. У C1 на аркуші2 введіть цю формулу, =SUMPRODUCT((Sheet1!$A$2:$A$22>=A2)*(Sheet1!$A$2:$A$22<=B2)), натисніть Що натомість? Створіть віртуальну версію себе у для підрахунку загальної кількості відповідних рядків. Дивіться знімок екрана:
doc витяг запису між датами 4

Примітка: у формулі Аркуш1 - аркуш містить вихідні дані, з яких потрібно витягти, $ A $ 2: $ A $ 22 - діапазон даних, A2 і B2 - дата початку та дата закінчення.

3. Виділіть порожню комірку, куди ви розмістите витягнуті дані, введіть цю формулу =IF(ROWS(A$5:A5)>$C$2,"",INDEX(Sheet1!A$2:A$22,SMALL(IF((Sheet1!$A$2:$A$22>=$A$2)*(Sheet1!$A$2:$A$22<=$B$2),ROW(Sheet1!A$2:A$22)-ROW(Sheet1!$A$2)+1),ROWS(A$5:A5)))), натисніть Shift + Ctrl + Enter клавіші та перетягніть маркер автоматичного заповнення по стовпцях і рядках, щоб витягти всі дані, поки не з’являться порожні комірки або нульові значення. Дивіться знімок екрана:
doc витяг запису між датами 5

4. Видаліть нулі та виберіть дати, що відображаються як 5-значні числа, перейдіть до Головна Вкладка і виберіть Коротке побачення у розкривному списку Загальне, щоб відформатувати їх у форматуванні дати. Дивіться знімок екрана:
doc витяг запису між датами 6


Витягніть усі записи між двома датами за допомогою Kutools для Excel

Якщо ви хочете легше впоратися з цією роботою, ви можете спробувати функцію «Вибрати конкретні клітинки» Kutools для Excel.

після установки Kutools для Excel, виконайте наведені нижче дії.(Безкоштовно завантажте Kutools для Excel зараз!)

1. Виберіть дані, з яких ви хочете витягти, натисніть Кутулс > Select > Виберіть певні клітини. Дивіться знімок екрана:
doc витяг запису між датами 7

2 В Виберіть певні клітини діалогове вікно, перевірте Весь ряд опція та виберіть Більш чим та Менш зі спадних списків введіть дату початку та дату закінчення в текстові поля, не забудьте перевірити і. Дивіться знімок екрана:
doc витяг запису між датами 8

3. клацання Ok > OK. І вибрано рядки, що відповідають датам. Натисніть Ctrl + C щоб скопіювати рядки, виберіть порожню клітинку та натисніть Ctrl + V щоб вставити його, див. знімок екрана:
doc витяг запису між датами 9

Найкращі інструменти продуктивності офісу

🤖 Kutools AI Aide: Революціонізуйте аналіз даних на основі: Інтелектуальне виконання   |  Згенерувати код  |  Створення спеціальних формул  |  Аналізуйте дані та створюйте діаграми  |  Викликати функції Kutools...
Популярні функції: Знайдіть, виділіть або визначте дублікати   |  Видалити порожні рядки   |  Об’єднайте стовпці або клітинки без втрати даних   |   Раунд без Формули ...
Супер пошук: VLookup за кількома критеріями    Багатозначний VLookup  |   VLookup на кількох аркушах   |   Нечіткий пошук ....
Розширений розкривний список: Швидке створення випадаючого списку   |  Залежний спадний список   |  Виберіть розкривний список, що вибирається ....
Менеджер колонок: Додайте конкретну кількість стовпців  |  Перемістити стовпці  |  Перемкнути статус видимості прихованих стовпців  |  Порівняйте діапазони та стовпці ...
Особливості: Фокус сітки   |  Перегляд дизайну   |   Велика панель формул    Диспетчер робочих книг і аркушів   |  Бібліотека ресурсів (автотекст)   |  Вибір дати   |  Об’єднайте робочі аркуші   |  Шифрування/розшифрування клітинок    Надсилайте листи за списком   |  Супер фільтр   |   Спеціальний фільтр (фільтр жирний/курсив/закреслений...) ...
Топ-15 наборів інструментів12 текст Tools (додати текст, Видалити символи, ...)   |   50 + Графік типи (діаграма Ганта, ...)   |   40+ Практичний Формули (Розрахуйте вік на основі дня народження, ...)   |   19 вставка Tools (Вставте QR-код, Вставити зображення зі шляху, ...)   |   12 Перетворення Tools (Числа до слів, Валютна конверсія, ...)   |   7 Злиття та розділення Tools (Розширені комбіновані ряди, Розділені клітини, ...)   |   ... і більше

Покращуйте свої навички Excel за допомогою Kutools для Excel і відчуйте ефективність, як ніколи раніше. Kutools для Excel пропонує понад 300 додаткових функцій для підвищення продуктивності та економії часу.  Натисніть тут, щоб отримати функцію, яка вам найбільше потрібна...

Опис


Вкладка Office Передає інтерфейс із вкладками в Office і значно полегшує вашу роботу

  • Увімкніть редагування та читання на вкладках у Word, Excel, PowerPoint, Publisher, Access, Visio та Project.
  • Відкривайте та створюйте кілька документів на нових вкладках того самого вікна, а не в нових вікнах.
  • Збільшує вашу продуктивність на 50% та зменшує сотні клацань миші для вас щодня!
Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, this formula worked ok, except it only returned one data set for each date in the range. Is there an adjustment to allow for multiple entries with the dame date value?
This comment was minimized by the moderator on the site
This formula works awesome thanks, I need some extra help though. I have 200 employees, each with certification that expires on different dates. The heading for each certification is at the top with their expiry dates below. I want to extract the rows that with all info if there is an expiry reached and throw them into a new sheet. Exactly like the example above just dated from multiple columns.
This comment was minimized by the moderator on the site
Hi, Christiaan82, could you upload the a screenshot about you workhsheet, or give me more details about the information of sheet format, only with your description, I do not get it clearly.
This comment was minimized by the moderator on the site
All sorted. Instead of trying to retrieve the rows from multiple columns, I added a new hidden sheet where all the info populates the info on top of each other. So the information only needs to be retrieved from one column, as per your example above.
Thank you Sunny
This comment was minimized by the moderator on the site
"drag Auto fill handle over columns and rows to extract all data until blank cells or zero values appear."
This doesn't seem to be working for me. The first row gives me the dates but the same gets repeated in the next two rows.
This comment was minimized by the moderator on the site
Hi, Neha, could you check if your auto calculate is turn on? Click Formulas > Calcuations Options > Automatic.
This comment was minimized by the moderator on the site
it worked well for single sheet. can u pls help me to get the same from multiple sheets of similar data. first 4 sheets contain similar data. i need all records of same 'date' in sheet5.
This comment was minimized by the moderator on the site
Can you extend the formula to check for dates that encompass more than one day? For example, using the same start and end dates from 1/1/15-12/31/16, but the data in sheet 1 have start and end dates too rather than just existing for a singular date.
This comment was minimized by the moderator on the site
This formula worked brilliantly. I was concerned as I have multiple date duplicates and there was no mention of how it handles those; no issues. It returned all relevant data.
Stoked.
This comment was minimized by the moderator on the site
Thanks for your support, you can combined the duplicate dates cells after extracting.
This comment was minimized by the moderator on the site
The trouble I am having because I need to find dates that run through the date range specified. So I want anything that runs through something like 1/2016 to 12/2017, however it needs to include start dates that may be before the range so I can identify the records I need to look at.
This comment was minimized by the moderator on the site
I used this code and it is pulling up dates outside of the window... how do I fix it?
This comment was minimized by the moderator on the site
Which code Kayla? Do you mean the formula?
This comment was minimized by the moderator on the site
I recreated this example in Excel 2010, and the result was that the first row of data would show up, but everything underneath had a number error.
This comment was minimized by the moderator on the site
Same thing happens to me n Excel 2010. Something in the formula doesn't work correctly.
This comment was minimized by the moderator on the site
Have you pressed Shift + Ctrl + Enter keys?
This comment was minimized by the moderator on the site
I see what's wrong. You have to press the shift + CTRL + Enter keys while still in edit mode.
I was hitting those keys after entering the formula and hitting ENTER.
I wish it would have been clearer.
This comment was minimized by the moderator on the site
Yes, brian, after typing the formula and still in edit mode, directly press Shift + Ctrl + Enter keys (the keys instead of Enter key), to get the correct result.
This comment was minimized by the moderator on the site
Still doesnt work for me? I am doing exactly as above and still returning the NUM error? Any other ideas?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations