Loncat ke daftar isi utama

 Bagaimana cara menghitung jumlah maksimal angka positif / negatif berturut-turut di Excel?

Jika Anda memiliki daftar data yang bercampur dengan angka positif dan negatif, dan sekarang, Anda ingin menghitung jumlah maksimal angka positif dan negatif berturut-turut seperti gambar berikut yang ditampilkan, bagaimana Anda bisa menangani tugas ini di Excel?

Hitung jumlah maksimal angka positif dan negatif yang berurutan dengan rumus array


Hitung jumlah maksimal angka positif dan negatif yang berurutan dengan rumus array

 

 

Untuk mendapatkan jumlah maksimal dari angka positif dan negatif yang berurutan, harap terapkan rumus array berikut:

Hitung jumlah maksimal bilangan positif yang berurutan:

Masukkan rumus ini ke dalam sel tempat Anda ingin mendapatkan hasilnya:

=MAX(FREQUENCY(IF(A2:A20>0,ROW(A2:A20)),IF(A2:A20<=0,ROW(A2:A20)))), lalu tekan Ctrl + Shift + Enter kunci bersama, dan Anda akan mendapatkan hasil yang benar sesuai kebutuhan, lihat tangkapan layar:


Hitung jumlah maksimal angka negatif yang berurutan:

Masukkan rumus ini ke dalam sel tempat Anda ingin mendapatkan hasilnya:

=MAX(FREQUENCY(IF(A2:A20<0,ROW(A2:A20)),IF(A2:A20>=0,ROW(A2:A20)))), lalu tekan Ctrl + Shift + Enter kunci secara bersamaan, dan Anda akan mendapatkan hasil yang Anda butuhkan, lihat tangkapan layar:

Note: Dalam rumus di atas, A2: A20 adalah daftar rentang sel yang ingin Anda gunakan.

 

Alat Produktivitas Kantor Terbaik

🤖 Kutools AI Ajudan: Merevolusi analisis data berdasarkan: Eksekusi Cerdas   |  Hasilkan Kode  |  Buat Rumus Khusus  |  Analisis Data dan Hasilkan Grafik  |  Aktifkan Fungsi Kutools...
Fitur Populer: Temukan, Sorot, atau Identifikasi Duplikat   |  Hapus Baris Kosong   |  Gabungkan Kolom atau Sel tanpa Kehilangan Data   |   Putaran tanpa Formula ...
Pencarian Super: VLookup Beberapa Kriteria    VLookup Nilai Berganda  |   VLookup di Beberapa Lembar   |   Pencarian Fuzzy ....
Daftar Drop-down Lanjutan: Buat Daftar Drop Down dengan Cepat   |  Daftar Drop Down yang Bergantung   |  Multi-pilih Drop Down List ....
Manajer Kolom: Tambahkan Jumlah Kolom Tertentu  |  Pindahkan Kolom  |  Alihkan Status Visibilitas Kolom Tersembunyi  |  Bandingkan Rentang & Kolom ...
Fitur Unggulan: Fokus Kisi   |  Tampilan Desain   |   Bar Formula Besar    Manajer Buku Kerja & Lembar   |  Perpustakaan Sumberdaya (Teks otomatis)   |  Pemetik tanggal   |  Gabungkan Lembar Kerja   |  Enkripsi/Dekripsi Sel    Kirim Email berdasarkan Daftar   |  Filter Super   |   Filter Khusus (filter tebal/miring/coret...) ...
15 Perangkat Teratas12 Teks Tools (Tambahkan Teks, Hapus Karakter, ...)   |   50 + Grafik jenis (Gantt Chart, ...)   |   40+ Praktis Rumus (Hitung usia berdasarkan ulang tahun, ...)   |   19 Insersi Tools (Masukkan Kode QR, Sisipkan Gambar dari Jalur, ...)   |   12 Konversi Tools (Angka ke Kata, Konversi Mata Uang, ...)   |   7 Gabungkan & Pisahkan Tools (Lanjutan Gabungkan Baris, Pisahkan Sel, ...)   |   ... dan banyak lagi

Tingkatkan Keterampilan Excel Anda dengan Kutools for Excel, dan Rasakan Efisiensi yang Belum Pernah Ada Sebelumnya. Kutools for Excel Menawarkan Lebih dari 300 Fitur Lanjutan untuk Meningkatkan Produktivitas dan Menghemat Waktu.  Klik Di Sini untuk Mendapatkan Fitur yang Paling Anda Butuhkan...

Deskripsi Produk


Tab Office Membawa antarmuka Tab ke Office, dan Membuat Pekerjaan Anda Jauh Lebih Mudah

  • Aktifkan pengeditan dan pembacaan tab di Word, Excel, PowerPoint, Publisher, Access, Visio, dan Project.
  • Buka dan buat banyak dokumen di tab baru di jendela yang sama, bukan di jendela baru.
  • Meningkatkan produktivitas Anda sebesar 50%, dan mengurangi ratusan klik mouse untuk Anda setiap hari!

 

Comments (20)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
PPPPPPPQQQQPPPPQQPPQQPPPPPP

I have a data like above. I have applied the formula that you have suggested. It was working fine. Answer was 7.

={MAX(FREQUENCY(IF(A4:AA4=P, COLUMN(A4:AA4)),IF(A4:AA4<>P, COLUMN(A4:AA4))))}
But now my requirement is this formula should consider only the last 10 cells from the formula applied cells. and the answer should come as 6.
Is it Possible.
Please suggest a way
This comment was minimized by the moderator on the site
Hi,
This was very useful. Thank You very much !!
A question, what if in the data array I want to ignore blanks or zeros. Like the if the next number after blank or zero is positive it should add in frequency

Thanks for your help
This comment was minimized by the moderator on the site
Hello, Naveen
To solve your problem, please try the below formula:
=MAX(FREQUENCY(IF(A2:A20>=0,ROW(A2:A20)),IF(A2:A20<0,ROW(A2:A20))))

After copying and pasting the formula, please remember to press Ctrl + Shift + Enter keys together to get the correct result.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
안녕하세요. 감사합니다. 데이터 필터된 상황의 경우에도 연속 손실이나 이익 수를 계산할 수 있는지 궁금합니다. 그리고 데이터 필터된 상횡의 평균 연속손실 수를 계산하는 방법은 있습니까?
Rated 5 out of 5
This comment was minimized by the moderator on the site
Wonderful, thank you! I'm using your formula now, but I have a question: Is there any way to further filter the data so that it only counts consecutive positive/negative cells IF they share a value in a different column? For example, if, using your example above, in Column B (next to your Number List in Column A) the cells were filled with either the letter 'A' or 'B' in random order, what formula would you use to determine the max number of positive cells that are ALSO consecutive A's in Column B?
This comment was minimized by the moderator on the site
It's amazing, just wondering if there a way to highlight consecutives?
This comment was minimized by the moderator on the site
I get an #Value output if there are only a streak of positive numbers only. Also, I get the same error, if there is only negative streak of numbers. It works fine when there are at least 1 positive and at least 1 negative number on the column. Does anybody knows how to fix this issue. I am using open office.Which uses the same commands, except for the " ; " instead of " , " as a separator.
This comment was minimized by the moderator on the site
Hello, Pablo,
The formulas work well in my wotksheet when there are a list of positive or negative numbers, do you press Ctrl + Shift + Enter keys together to get the result?
This comment was minimized by the moderator on the site
Hello,
Tank you for this post.I'm trying to get the average number of consecutive negative number from a row.I've been trying to do it myself but I can't figure it out.
Would you mind helping me ?
Thanks !
This comment was minimized by the moderator on the site
So, usefull context. I was jus making a video for my Youtube Channel. When i googeled some key word, i came across with your formula. First of all, thank you. And secondly i will give reference to this website for the formulas explanation. I have not so many subscriber, but it may give your website a littele bit more traffic. Thank you and have nice day.
This comment was minimized by the moderator on the site
Hi, thank you very much for the information! It's very useful :) I wondering if is posible to add up the Max Number of consecutive negatives? I will apreciate a lot if you can help me. Thank you!!
This comment was minimized by the moderator on the site
Hi, Joan,
To solve your problem, please do with the following array formula:

Sum max number of consecutive positive numbers: (Note: D2 is the cell of the consecutive positive numbers you have counted by the using the formula in this article, please press Ctrl + Shift + Enter keys together)
=MAX((COUNTIF(OFFSET(A2:A18,ROW(A2:A18)-ROW(A2),0,D2),">=0")=D2)*SUBTOTAL(9,OFFSET($A$2:$A$18,ROW(A2:A18)-ROW($A$2),0,D2)))

Sum max number of consecutive negative numbers: (Note: E2 is the cell of the consecutive negative numbers you have counted by the using the formula in this article, please press Ctrl + Shift + Enter keys together)
=MIN((COUNTIF(OFFSET(A2:A18,ROW(A2:A18)-ROW(A2),0,E2),"<0")=E2)*SUBTOTAL(9,OFFSET($A$2:$A$18,ROW(A2:A18)-ROW($A$2),0,E2)))

Please try, hope it can help you!
This comment was minimized by the moderator on the site
how do you count consecutive occurrences of two different values or numbers
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations